summaryrefslogtreecommitdiff
path: root/default.nix
blob: a8a3c1174180ee40951b37baca013da36baba3fc (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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;
}