pwndbg/flake.nix

54 lines
1.7 KiB
Nix
Raw Normal View History

{
description = "pwndbg";
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
inputs.poetry2nix = {
url = "github:nix-community/poetry2nix";
inputs.nixpkgs.follows = "nixpkgs";
};
outputs = { self, nixpkgs, poetry2nix }:
let
2023-09-29 04:08:24 +08:00
# Self contained packages for: Debian, RHEL-like (yum, rpm), Alpine, Arch packages
forAllSystems = nixpkgs.lib.genAttrs nixpkgs.lib.systems.flakeExposed;
forPortables = nixpkgs.lib.genAttrs [ "deb" "rpm" "apk" "archlinux" ];
pkgsBySystem = forAllSystems (system: import nixpkgs {
inherit system;
overlays = [ poetry2nix.overlay ];
});
pkgUtil = forAllSystems (system: import ./nix/bundle/pkg.nix {
pkgs = pkgsBySystem.${system};
});
portableDrv = system: import ./nix/portable.nix {
pkgs = pkgsBySystem.${system};
pwndbg = self.packages.${system}.pwndbg;
};
portableDrvs = system: forPortables (packager: pkgUtil.${system}.buildPackagePFPM {
inherit packager;
drv = portableDrv system;
config = ./nix/bundle/nfpm.yaml;
preremove = ./nix/bundle/preremove.sh;
});
tarballDrv = system: {
tarball = pkgUtil.${system}.buildPackageTarball {
drv = portableDrv system;
};
};
in
{
packages = forAllSystems (system: {
pwndbg = import ./nix/pwndbg.nix {
pkgs = pkgsBySystem.${system};
python3 = pkgsBySystem.${system}.python3;
gdb = pkgsBySystem.${system}.gdb;
inputs.pwndbg = self;
};
default = self.packages.${system}.pwndbg;
}
// (portableDrvs system)
// (tarballDrv system)
);
};
2023-09-29 05:52:59 +08:00
}