From d6126294bf27c93e0f05cbd3129e9b20493db6d0 Mon Sep 17 00:00:00 2001 From: Cara Salter Date: Mon, 28 Feb 2022 09:34:37 -0500 Subject: Nix and updated templates --- default.nix | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 default.nix (limited to 'default.nix') diff --git a/default.nix b/default.nix new file mode 100644 index 0000000..a8a3c11 --- /dev/null +++ b/default.nix @@ -0,0 +1,16 @@ +{ 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; +} -- cgit v1.2.3