Skip to content

Commit 7413d9c

Browse files
committed
update flake
1 parent 1a5fdef commit 7413d9c

2 files changed

Lines changed: 35 additions & 65 deletions

File tree

flake.lock

Lines changed: 9 additions & 43 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flake.nix

Lines changed: 26 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -4,33 +4,37 @@
44
url = "github:nix-community/fenix";
55
inputs.nixpkgs.follows = "nixpkgs";
66
};
7-
flake-utils.url = "github:numtide/flake-utils";
87
nixpkgs.url = "nixpkgs/nixos-unstable";
98
};
109

1110
outputs = {
1211
self,
1312
fenix,
14-
flake-utils,
1513
nixpkgs,
16-
}:
17-
flake-utils.lib.eachDefaultSystem (system: {
18-
packages.default = let
19-
toolchain = fenix.packages.${system}.minimal.toolchain;
20-
pkgs = nixpkgs.legacyPackages.${system};
21-
in
22-
(pkgs.makeRustPlatform {
23-
cargo = toolchain;
24-
rustc = toolchain;
25-
})
26-
.buildRustPackage {
27-
pname = "pinned-init";
28-
version = "0.0.7";
29-
30-
src = ./.;
31-
32-
cargoLock.lockFile = ./Cargo.lock;
33-
};
34-
});
14+
}: let
15+
system = "x86_64-linux";
16+
pkgs = import nixpkgs {
17+
overlays = [fenix.overlays.default];
18+
inherit system;
19+
};
20+
in {
21+
packages."${system}".default = fenix.packages."${system}".minimal.toolchain;
22+
devShells."${system}".default = pkgs.mkShell {
23+
name = "rust";
24+
packages = with pkgs; [
25+
(fenix.packages."${system}".complete.withComponents [
26+
"cargo"
27+
"clippy"
28+
"rust-src"
29+
"rustc"
30+
"rustfmt"
31+
])
32+
cargo-expand
33+
cargo-rdme
34+
cargo-semver-checks
35+
rust-analyzer-nightly
36+
];
37+
shellHook = ''LD_LIBRARY_PATH="${pkgs.stdenv.cc.cc.lib}/lib" exec fish'';
38+
};
39+
};
3540
}
36-

0 commit comments

Comments
 (0)