diff --git a/pkgs/tools/misc/starfetch/default.nix b/pkgs/tools/misc/starfetch/default.nix new file mode 100755 index 000000000000..3dfff1400e9e --- /dev/null +++ b/pkgs/tools/misc/starfetch/default.nix @@ -0,0 +1,36 @@ +{ stdenv, lib, fetchFromGitHub }: + +stdenv.mkDerivation rec { + pname = "starfetch"; + version = "0.0.2"; + + src = fetchFromGitHub { + owner = "Haruno19"; + repo = "starfetch"; + rev = version; + sha256 = "sha256-waJ1DbOqhZ3hHtqcODSXBC+O46S8RSxuBuoEqs8OfgI="; + }; + + postPatch = '' + substituteInPlace src/starfetch.cpp --replace /usr/local/ $out/ + ''; + + installPhase = '' + runHook preInstall + + mkdir -p $out/bin + mkdir -p $out/share/starfetch + cp starfetch $out/bin/ + cp -r res/* $out/share/starfetch/ + + runHook postInstall + ''; + + meta = with lib; { + description = "CLI star constellations displayer"; + homepage = "https://github.com/Haruno19/starfetch"; + license = licenses.gpl3Plus; + platforms = platforms.all; + maintainers = with maintainers; [ papojari ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index e69fa48b8fe9..88c6ce0f6fc0 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -24335,6 +24335,8 @@ with pkgs; stdmanpages = callPackage ../data/documentation/std-man-pages { }; + starfetch = callPackage ../tools/misc/starfetch { }; + starship = callPackage ../tools/misc/starship { inherit (darwin.apple_sdk.frameworks) Security Foundation; };