at 23.11-beta 68 lines 1.5 kB view raw
1{ lib 2, fetchFromGitHub 3, python3 4, stdenv 5, strip-nondeterminism 6, zip 7}: 8 9let 10 version = "1.1.0"; 11 sha256 = "sha256-563xOz63vto19yuaHtReV1dSw6BgNf+CLtS3lrPnaoc="; 12 13 pname = "pridefetch"; 14 src = fetchFromGitHub { 15 owner = "SpyHoodle"; 16 repo = pname; 17 rev = "v" + version; 18 inherit sha256; 19 }; 20in 21 22stdenv.mkDerivation { 23 inherit pname version src; 24 25 nativeBuildInputs = [ 26 strip-nondeterminism 27 zip 28 ]; 29 30 buildInputs = [ 31 (python3.withPackages (pythonPackages: with pythonPackages; [ 32 distro 33 ])) 34 ]; 35 36 buildPhase = '' 37 runHook preBuild 38 pushd src 39 zip -r ../pridefetch.zip ./* 40 strip-nondeterminism ../pridefetch.zip 41 popd 42 echo '#!/usr/bin/env python' | cat - pridefetch.zip > pridefetch 43 rm pridefetch.zip 44 runHook postBuild 45 ''; 46 47 installPhase = '' 48 runHook preInstall 49 mkdir -p $out/bin 50 mv pridefetch $out/bin/pridefetch 51 chmod +x $out/bin/pridefetch 52 runHook postInstall 53 ''; 54 55 meta = with lib; { 56 description = "Print out system statistics with pride flags"; 57 longDescription = '' 58 Pridefetch prints your system statistics (similarly to neofetch, screenfetch or pfetch) along with a pride flag. 59 The flag which is printed is configurable, as well as the width of the output. 60 ''; 61 homepage = "https://github.com/SpyHoodle/pridefetch"; 62 license = licenses.mit; 63 maintainers = [ 64 maintainers.minion3665 65 ]; 66 platforms = platforms.all; 67 }; 68}