blob: 901496264a3fbfb40bd26cf3b55ef2d79cef43ac (
plain) (
blame)
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
|
{
pkgs ? import <nixpkgs> { },
lib ? pkgs.lib,
...
}:
let
buildNimSbom = pkgs.callPackage ./build-nim-sbom.nix { };
nix' = pkgs.nixVersions.latest.overrideAttrs (_: {
version = "2024-08-23";
src = pkgs.fetchFromGitHub {
owner = "nixos";
repo = "nix";
rev = "85f1aa6b3df5c5fcc924a74e2a9cc8acea9ba0e1";
hash = "sha256-3+UgAktTtkGUNpxMxr+q+R+z3r026L3PwJzG6RD2IXM=";
};
});
in
buildNimSbom (finalAttrs: {
outputs = [
"out"
"cfg"
];
nativeBuildInputs = [ pkgs.pkg-config ];
buildInputs = [ nix' ];
src = if lib.inNixShell then null else lib.cleanSource ./.;
postInstall = ''
mkdir $cfg
export mainProgram="$out/bin/nix-actor"
substituteAll service.pr.in $cfg/service.pr
'';
}) ./sbom.json
|