PrideFetch/flake.nix

56 lines
2.1 KiB
Nix
Raw Normal View History

2022-05-22 20:21:50 +01:00
{
description = "A flake to run pridefetch";
outputs = { self, nixpkgs }: let
system = "x86_64-linux";
2022-05-22 21:00:40 +01:00
forAllSystems = f: nixpkgs.lib.genAttrs nixpkgs.lib.systems.supported.hydra (system: f system);
2022-05-22 20:21:50 +01:00
in rec {
2022-05-22 21:00:40 +01:00
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
cd src
zip -r ../pridefetch.zip *
echo '#!/usr/bin/env python' | cat - pridefetch.zip > $out/bin/pridefetch
2022-05-22 21:00:40 +01:00
chmod +x $out/bin/pridefetch
'';
2022-05-23 09:22:18 +01:00
meta = with pkgs.lib; {
description = "Print out system statistics with pride flags";
longDescription = ''
Pridefetch prints your system statistics (similarly to neofetch, screenfetch or pfetch) along with a pride flag.
The flag which is printed is configurable, as well as the width of the output.
'';
homepage = https://github.com/SpyHoodle/pridefetch;
license = "bsd";
# https://static.domenkozar.com/nixpkgs-manual-sphinx-exp/meta.xml.html
# > Catch-all for licenses that are essentially similar to the original BSD license with the advertising clause removed, i.e. permissive non-copyleft free software licenses. This includes the X11 (“MIT”) License.
# our license is MIT, so BSD is set here
maintainers = [
{
email = "skyler3665@gmail.com";
github = "minion3665";
githubId = 34243578;
name = "Skyler Grey";
}
]; # TODO: Replace this with a reference to the maintainer list after adding myself to it
platforms = systems.supported.hydra;
};
2022-05-22 21:00:40 +01:00
};
});
2022-05-22 20:21:50 +01:00
2022-05-22 21:00:40 +01:00
defaultPackage = forAllSystems (system: self.packages.${system}.pridefetch);
2022-05-22 20:21:50 +01:00
};
}