Let flake run under all systems

This commit is contained in:
Skyler Grey 2022-05-22 21:00:40 +01:00
parent eaf2fa2e24
commit b4197e9b95
No known key found for this signature in database
GPG Key ID: 24D31D3B1B986F33

View File

@ -4,26 +4,30 @@
outputs = { self, nixpkgs }: let
system = "x86_64-linux";
pkgs = import nixpkgs {
inherit system;
};
forAllSystems = f: nixpkgs.lib.genAttrs nixpkgs.lib.systems.supported.hydra (system: f system);
in rec {
packages."${system}".pridefetch = pkgs.stdenv.mkDerivation {
name = "pridefetch";
buildInputs = [
(pkgs.python39.withPackages (pythonPackages: with pythonPackages; [
distro
]))
];
unpackPhase = "true";
installPhase = ''
mkdir -p $out/bin
cp ${./pridefetch} $out/bin/pridefetch
cp ${./packages.py} $out/bin/packages.py
chmod +x $out/bin/pridefetch
'';
};
packages = forAllSystems (system: let
pkgs = import nixpkgs {
inherit system;
};
in {
pridefetch = pkgs.stdenv.mkDerivation {
name = "pridefetch";
buildInputs = [
(pkgs.python39.withPackages (pythonPackages: with pythonPackages; [
distro
]))
];
unpackPhase = "true";
installPhase = ''
mkdir -p $out/bin
cp ${./pridefetch} $out/bin/pridefetch
cp ${./packages.py} $out/bin/packages.py
chmod +x $out/bin/pridefetch
'';
};
});
defaultPackage."${system}" = packages."${system}".pridefetch;
defaultPackage = forAllSystems (system: self.packages.${system}.pridefetch);
};
}