-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathflake.nix
More file actions
34 lines (29 loc) · 822 Bytes
/
flake.nix
File metadata and controls
34 lines (29 loc) · 822 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
{
description = "A devShell example";
inputs = {
nixpkgs.url = github:nixos/nixpkgs/nixos-24.11;
flake-utils.url = github:numtide/flake-utils;
};
outputs = { self, nixpkgs, flake-utils, ... }:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = import nixpkgs {
inherit system;
};
in
with pkgs;
rec {
devShell = mkShell {
buildInputs = [ cargo rustfmt clippy rustc ];
RUST_BACKTRACE="full";
};
packages.scromble = rustPlatform.buildRustPackage rec {
name = "scromble-${version}";
version = if (self ? rev) then self.rev else "dirty";
src = self;
cargoLock.lockFile = ./Cargo.lock;
};
packages.default = packages.scromble;
}
);
}