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