aboutsummaryrefslogtreecommitdiff
path: root/whirl.nix
diff options
context:
space:
mode:
Diffstat (limited to 'whirl.nix')
-rw-r--r--whirl.nix17
1 files changed, 17 insertions, 0 deletions
diff --git a/whirl.nix b/whirl.nix
new file mode 100644
index 0000000..9e37ba8
--- /dev/null
+++ b/whirl.nix
@@ -0,0 +1,17 @@
+{ sources ? import ./nix/sources.nix, pkgs ? import sources.nixpkgs { } }:
+
+let
+ rust = import ./nix/rust.nix { inherit sources; };
+
+ naersk = pkgs.callPackage sources.naersk {
+ rustc = rust;
+ cargo = rust;
+ };
+
+ src = builtins.filterSource
+ (path: type: type != "directory" || builtins.baseNameOf path != "target")
+ ./.;
+in naersk.buildPackage {
+ inherit src;
+ remapPathPrefix = true;
+}