From 20d91e0545716ed2b215f6be05a9a29d045c246f Mon Sep 17 00:00:00 2001 From: Rebecca Turner Date: Mon, 28 Aug 2023 10:27:08 -0700 Subject: [PATCH 1/3] misc-gitology: init at unstable-2024-08-26 https://blog.aloni.org/posts/gitology-1-git-flip-history/ https://github.com/da-x/misc-gitology --- pkgs/by-name/mi/misc-gitology/package.nix | 45 +++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 pkgs/by-name/mi/misc-gitology/package.nix diff --git a/pkgs/by-name/mi/misc-gitology/package.nix b/pkgs/by-name/mi/misc-gitology/package.nix new file mode 100644 index 0000000000000..c3365b575a8a6 --- /dev/null +++ b/pkgs/by-name/mi/misc-gitology/package.nix @@ -0,0 +1,45 @@ +{ + stdenv, + lib, + fetchFromGitHub, + nix-update-script, + perl, + python3, +}: +stdenv.mkDerivation { + pname = "misc-gitology"; + version = "unstable-2024-08-26"; + + src = fetchFromGitHub { + owner = "da-x"; + repo = "misc-gitology"; + rev = "8f6b200ed5f4d39f86026cf050f325d5f5713950"; + hash = "sha256-6LoMJUOyBpP1HvVXNahEQlN1JKC9KflcOH9QWIi4M6s="; + }; + + dontBuild = true; + + buildInputs = [ + python3 + # For `git-find-blob`: + perl + ]; + + installPhase = '' + mkdir -p $out/bin + find . \ + -type f \ + -executable \ + -maxdepth 1 \ + -exec install --target-directory=$out/bin/ {} + + ''; + + meta = with lib; { + description = "Assortment of scripts around Git"; + homepage = "https://github.com/da-x/misc-gitology"; + license = [ licenses.bsd2 ]; + maintainers = [ maintainers._9999years ]; + }; + + passthru.updateScript = nix-update-script { }; +} From 7c4d31d327f88f88258e69beaed6aec3c35b5d61 Mon Sep 17 00:00:00 2001 From: Rebecca Turner Date: Mon, 25 Nov 2024 10:09:02 -0800 Subject: [PATCH 2/3] misc-gitology: Versions start with a digit Co-authored-by: Arne Keller <2012gdwu+github@posteo.de> --- pkgs/by-name/mi/misc-gitology/package.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/by-name/mi/misc-gitology/package.nix b/pkgs/by-name/mi/misc-gitology/package.nix index c3365b575a8a6..0f13d229b2cf5 100644 --- a/pkgs/by-name/mi/misc-gitology/package.nix +++ b/pkgs/by-name/mi/misc-gitology/package.nix @@ -8,7 +8,7 @@ }: stdenv.mkDerivation { pname = "misc-gitology"; - version = "unstable-2024-08-26"; + version = "0-unstable-2024-08-26"; src = fetchFromGitHub { owner = "da-x"; From 81909529585a906d6495376dc1d991a11c6a1db1 Mon Sep 17 00:00:00 2001 From: Rebecca Turner Date: Mon, 25 Nov 2024 10:09:21 -0800 Subject: [PATCH 3/3] misc-gitology: Run preInstall/postInstall hooks Co-authored-by: Arne Keller <2012gdwu+github@posteo.de> --- pkgs/by-name/mi/misc-gitology/package.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkgs/by-name/mi/misc-gitology/package.nix b/pkgs/by-name/mi/misc-gitology/package.nix index 0f13d229b2cf5..a8d633d4874fe 100644 --- a/pkgs/by-name/mi/misc-gitology/package.nix +++ b/pkgs/by-name/mi/misc-gitology/package.nix @@ -26,12 +26,14 @@ stdenv.mkDerivation { ]; installPhase = '' + runHook preInstall mkdir -p $out/bin find . \ -type f \ -executable \ -maxdepth 1 \ -exec install --target-directory=$out/bin/ {} + + runHook postInstall ''; meta = with lib; {