Skip to content

Commit

Permalink
update flake
Browse files Browse the repository at this point in the history
  • Loading branch information
y86-dev committed May 27, 2024
1 parent 1a5fdef commit 7413d9c
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 65 deletions.
52 changes: 9 additions & 43 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

48 changes: 26 additions & 22 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,33 +4,37 @@
url = "github:nix-community/fenix";
inputs.nixpkgs.follows = "nixpkgs";
};
flake-utils.url = "github:numtide/flake-utils";
nixpkgs.url = "nixpkgs/nixos-unstable";
};

outputs = {
self,
fenix,
flake-utils,
nixpkgs,
}:
flake-utils.lib.eachDefaultSystem (system: {
packages.default = let
toolchain = fenix.packages.${system}.minimal.toolchain;
pkgs = nixpkgs.legacyPackages.${system};
in
(pkgs.makeRustPlatform {
cargo = toolchain;
rustc = toolchain;
})
.buildRustPackage {
pname = "pinned-init";
version = "0.0.7";

src = ./.;

cargoLock.lockFile = ./Cargo.lock;
};
});
}: let
system = "x86_64-linux";
pkgs = import nixpkgs {
overlays = [fenix.overlays.default];
inherit system;
};
in {
packages."${system}".default = fenix.packages."${system}".minimal.toolchain;
devShells."${system}".default = pkgs.mkShell {
name = "rust";
packages = with pkgs; [
(fenix.packages."${system}".complete.withComponents [
"cargo"
"clippy"
"rust-src"
"rustc"
"rustfmt"
])
cargo-expand
cargo-rdme
cargo-semver-checks
rust-analyzer-nightly
];
shellHook = ''LD_LIBRARY_PATH="${pkgs.stdenv.cc.cc.lib}/lib" exec fish'';
};
};
}

0 comments on commit 7413d9c

Please sign in to comment.