Skip to content
Snippets Groups Projects
Verified Commit b4da44e0 authored by loutr's avatar loutr
Browse files

build(nix): change rust overlay to use nightly

parent 8ef38e57
No related branches found
No related tags found
Loading
Pipeline #10545 passed with stage
in 26 seconds
......@@ -15,13 +15,28 @@
"type": "github"
}
},
"flake-utils_2": {
"locked": {
"lastModified": 1656928814,
"narHash": "sha256-RIFfgBuKz6Hp89yRr7+NR5tzIAbn52h8vT6vXkYjZoM=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "7e2a3b3dfd9af950a856d66b0a7d01e3c18aa249",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1663494472,
"narHash": "sha256-fSowlaoXXWcAM8m9wA6u+eTJJtvruYHMA+Lb/tFi/qM=",
"lastModified": 1663761423,
"narHash": "sha256-bDLXl2BVq7eIQz/8CduZI1SLyhG9u/CrckHd6f7bwPE=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "f677051b8dc0b5e2a9348941c99eea8c4b0ff28f",
"rev": "d6490a0bd9dfb298fcd8382d3363b86870dc7340",
"type": "github"
},
"original": {
......@@ -33,7 +48,29 @@
"root": {
"inputs": {
"flake-utils": "flake-utils",
"nixpkgs": "nixpkgs"
"nixpkgs": "nixpkgs",
"rust-overlay": "rust-overlay"
}
},
"rust-overlay": {
"inputs": {
"flake-utils": "flake-utils_2",
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1663815552,
"narHash": "sha256-J4j/d69SGKx1qripBCINe7T3SUtMM1sdj5PoHRThV5Q=",
"owner": "oxalica",
"repo": "rust-overlay",
"rev": "f45f856ae5a9fe2c48d756fa17bb9c5b3b8070c5",
"type": "github"
},
"original": {
"owner": "oxalica",
"repo": "rust-overlay",
"type": "github"
}
}
},
......
......@@ -2,16 +2,26 @@
inputs = {
flake-utils.url = "github:numtide/flake-utils";
nixpkgs.url = "nixpkgs/nixos-unstable";
rust-overlay.url = "github:oxalica/rust-overlay";
rust-overlay.inputs.nixpkgs.follows = "nixpkgs";
};
outputs = { self, flake-utils, nixpkgs }:
outputs = { self, flake-utils, rust-overlay, nixpkgs }:
flake-utils.lib.eachDefaultSystem (system:
let pkgs = nixpkgs.legacyPackages.${system};
let
rustPackages = pkgs.rust-bin.nightly.latest;
pkgs = import nixpkgs {
inherit system;
overlays = [ (import rust-overlay) ];
};
in rec {
packages.default = pkgs.rustPlatform.buildRustPackage {
pname = "proost";
version = "0.1.0";
nativeBuildInputs = [ rustPackages.default ];
src = ./.;
cargoLock.lockFile = ./Cargo.lock;
......@@ -25,7 +35,7 @@
devShells.default = pkgs.mkShell {
name = "proost-dev";
packages = packages.default.nativeBuildInputs
++ (with pkgs; [ rustfmt clippy ]);
++ (with rustPackages; [ rustfmt clippy ]);
};
});
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment