build: nix flakes
This commit is contained in:
39
default.nix
Normal file
39
default.nix
Normal file
@ -0,0 +1,39 @@
|
||||
{ pkgs ? (
|
||||
let
|
||||
inherit (builtins) fetchTree fromJSON readFile;
|
||||
inherit ((fromJSON (readFile ./flake.lock)).nodes) nixpkgs gomod2nix;
|
||||
in
|
||||
import (fetchTree nixpkgs.locked) {
|
||||
overlays = [
|
||||
(import "${fetchTree gomod2nix.locked}/overlay.nix")
|
||||
];
|
||||
}
|
||||
)
|
||||
, lib
|
||||
, self
|
||||
}:
|
||||
|
||||
pkgs.buildGoApplication rec {
|
||||
pname = "out-of-tree";
|
||||
|
||||
version = "unstable";
|
||||
|
||||
nativeBuildInputs = [ pkgs.makeWrapper ];
|
||||
|
||||
src = ./.;
|
||||
pwd = ./.;
|
||||
|
||||
doCheck = false;
|
||||
|
||||
postFixup = ''
|
||||
wrapProgram $out/bin/out-of-tree \
|
||||
--prefix PATH : "${lib.makeBinPath [ pkgs.qemu pkgs.podman ]}"
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "kernel {module, exploit} development tool";
|
||||
homepage = "https://out-of-tree.io";
|
||||
maintainers = [ maintainers.dump_stack ];
|
||||
license = licenses.agpl3Plus;
|
||||
};
|
||||
}
|
Reference in New Issue
Block a user