fix package scope

This commit is contained in:
Sean Buckley 2021-08-20 13:40:05 -04:00
parent 819eece875
commit 7691245a6a

View file

@ -4,6 +4,19 @@
inputs.impermanence.url = "github:nix-community/impermanence"; inputs.impermanence.url = "github:nix-community/impermanence";
outputs = { self, nixpkgs, impermanence, ... }@inputs: outputs = { self, nixpkgs, impermanence, ... }@inputs:
let
mypkgs = pkgs:
{
commander-x16 = pkgs.callPackage ./pkgs/commander-x16 { };
gef = pkgs.callPackage ./pkgs/gef { };
weevely = pkgs.callPackage ./pkgs/weevely { };
}
// (if pkgs.system != "x86_64-linux" then { } else
{
binaryninja = pkgs.callPackage ./pkgs/binary-ninja-personal { };
packettracer = pkgs.callPackage ./pkgs/packettracer { };
});
in
{ {
nixosModules = { nixosModules = {
inherit (impermanence.nixosModules) impermanence; inherit (impermanence.nixosModules) impermanence;
@ -26,12 +39,7 @@
nixosModule = { pkgs, ... }: { nixosModule = { pkgs, ... }: {
imports = builtins.attrValues self.nixosModules; imports = builtins.attrValues self.nixosModules;
nixpkgs.overlays = [ nixpkgs.overlays = [ (_: mypkgs) ];
(_: _: {
gef = pkgs.callPackage ./pkgs/gef { };
weevely = pkgs.callPackage ./pkgs/weevely { };
})
];
}; };
nixosConfigurations = self.lib.getHosts inputs ./hosts; nixosConfigurations = self.lib.getHosts inputs ./hosts;
@ -44,19 +52,8 @@
); );
}; };
packages = self.lib.forAllSystems (system: packages = self.lib.forAllSystems
with nixpkgs.legacyPackages.${system}; (system: mypkgs nixpkgs.legacyPackages.${system});
{
commander-x16 = callPackage ./pkgs/commander-x16 { };
gef = callPackage ./pkgs/gef { };
weevely = callPackage ./pkgs/weevely { };
}
// (if system != "x86_64-linux" then { } else
{
binaryninja = callPackage ./pkgs/binary-ninja-personal { };
packettracer = callPackage ./pkgs/packettracer { };
})
);
apps = self.lib.forAllSystems (system: apps = self.lib.forAllSystems (system:
with nixpkgs.legacyPackages.${system}; with nixpkgs.legacyPackages.${system};