2023-06-10 04:31:52 +00:00
|
|
|
{ lib
|
|
|
|
, fetchFromGitHub
|
|
|
|
, python3
|
|
|
|
, stdenv
|
2023-06-10 04:43:00 +00:00
|
|
|
, strip-nondeterminism
|
2023-06-10 04:31:52 +00:00
|
|
|
, zip
|
|
|
|
}:
|
|
|
|
|
|
|
|
let
|
2022-10-12 05:13:36 +00:00
|
|
|
version = "1.1.0";
|
|
|
|
sha256 = "sha256-563xOz63vto19yuaHtReV1dSw6BgNf+CLtS3lrPnaoc=";
|
2022-05-28 22:50:18 +00:00
|
|
|
|
|
|
|
pname = "pridefetch";
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "SpyHoodle";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v" + version;
|
|
|
|
inherit sha256;
|
|
|
|
};
|
2023-06-10 04:31:52 +00:00
|
|
|
in
|
|
|
|
|
|
|
|
stdenv.mkDerivation {
|
2022-05-28 22:50:18 +00:00
|
|
|
inherit pname version src;
|
2023-06-10 04:31:52 +00:00
|
|
|
|
2022-05-28 22:50:18 +00:00
|
|
|
nativeBuildInputs = [
|
2023-06-10 04:43:00 +00:00
|
|
|
strip-nondeterminism
|
2022-05-28 22:50:18 +00:00
|
|
|
zip
|
|
|
|
];
|
2023-06-10 04:31:52 +00:00
|
|
|
|
2022-05-28 22:50:18 +00:00
|
|
|
buildInputs = [
|
|
|
|
(python3.withPackages (pythonPackages: with pythonPackages; [
|
|
|
|
distro
|
|
|
|
]))
|
|
|
|
];
|
2023-06-10 04:31:52 +00:00
|
|
|
|
2022-05-28 22:50:18 +00:00
|
|
|
buildPhase = ''
|
|
|
|
runHook preBuild
|
|
|
|
pushd src
|
|
|
|
zip -r ../pridefetch.zip ./*
|
2023-06-10 04:43:00 +00:00
|
|
|
strip-nondeterminism ../pridefetch.zip
|
2022-05-28 22:50:18 +00:00
|
|
|
popd
|
|
|
|
echo '#!/usr/bin/env python' | cat - pridefetch.zip > pridefetch
|
|
|
|
rm pridefetch.zip
|
|
|
|
runHook postBuild
|
|
|
|
'';
|
2023-06-10 04:31:52 +00:00
|
|
|
|
2022-05-28 22:50:18 +00:00
|
|
|
installPhase = ''
|
|
|
|
runHook preInstall
|
|
|
|
mkdir -p $out/bin
|
|
|
|
mv pridefetch $out/bin/pridefetch
|
|
|
|
chmod +x $out/bin/pridefetch
|
|
|
|
runHook postInstall
|
|
|
|
'';
|
2023-06-10 04:31:52 +00:00
|
|
|
|
2022-05-28 22:50:18 +00:00
|
|
|
meta = with 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 = licenses.mit;
|
|
|
|
maintainers = [
|
|
|
|
maintainers.minion3665
|
|
|
|
];
|
|
|
|
platforms = platforms.all;
|
2023-11-27 01:17:53 +00:00
|
|
|
mainProgram = "pridefetch";
|
2022-05-28 22:50:18 +00:00
|
|
|
};
|
|
|
|
}
|