nixpkgs/pkgs/tools/misc/starfetch/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

39 lines
917 B
Nix
Raw Normal View History

2022-04-06 16:30:45 +02:00
{ stdenv, lib, fetchFromGitHub }:
stdenv.mkDerivation rec {
pname = "starfetch";
2022-10-23 05:30:19 +02:00
version = "0.0.3";
2022-04-06 16:30:45 +02:00
src = fetchFromGitHub {
owner = "Haruno19";
repo = "starfetch";
rev = version;
2022-10-23 05:30:19 +02:00
sha256 = "sha256-2npevr3eSFhB58gRB2IuG4nwzPEGr0xcoSa/4VS0DNg=";
2022-04-06 16:30:45 +02:00
};
postPatch = ''
substituteInPlace src/starfetch.cpp --replace /usr/local/ $out/
2022-10-23 06:21:43 +02:00
'' + lib.optionalString stdenv.cc.isClang ''
substituteInPlace makefile --replace g++ clang++
2022-04-06 16:30:45 +02:00
'';
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;
2022-07-20 01:47:30 +02:00
maintainers = with maintainers; [ annaaurora ];
2022-04-06 16:30:45 +02:00
};
}