Skip to content

Commit e152008

Browse files
committed
flake and forget
1 parent 5d19355 commit e152008

File tree

2 files changed

+41
-0
lines changed

2 files changed

+41
-0
lines changed

flake.lock

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

flake.nix

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
outputs =
3+
{ nixpkgs, ... }:
4+
let
5+
inherit (builtins) fromTOML readFile mapAttrs;
6+
project = (fromTOML (readFile ./Cargo.toml)).package;
7+
in
8+
{
9+
packages = mapAttrs (_: pkgs: {
10+
default = pkgs.rustPlatform.buildRustPackage {
11+
inherit (project) version;
12+
pname = project.name;
13+
cargoLock.lockFile = ./Cargo.lock;
14+
src = ./.;
15+
};
16+
}) nixpkgs.legacyPackages;
17+
};
18+
}

0 commit comments

Comments
 (0)