about summary refs log tree commit diff
diff options
context:
space:
mode:
authorBenno Bielmeier <nix@bbenno.com>2022-04-30 16:47:25 +0200
committerKerstin <kerstin@erictapen.name>2022-05-22 15:06:00 +0200
commit8a770f06a20bd5c6d9e311f165d012aed426deac (patch)
tree4df28a632c6c50217b23ccfc3f3afd12085c40ce
parent9ce5907d02442d2613d3f69cc61949839e576d29 (diff)
gollum: refactor package
use `bundlerApp` in preference to `stdenv.mkDerivation`
-rw-r--r--maintainers/maintainer-list.nix6
-rw-r--r--nixos/modules/services/misc/gollum.nix2
-rw-r--r--pkgs/applications/misc/gollum/default.nix31
3 files changed, 15 insertions, 24 deletions
diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix
index 3b70ccedd7e83..24410905627b4 100644
--- a/maintainers/maintainer-list.nix
+++ b/maintainers/maintainer-list.nix
@@ -1412,6 +1412,12 @@
     githubId = 916366;
     name = "Brandon Elam Barker";
   };
+  bbenno = {
+    email = "nix@bbenno.com";
+    github = "bbenno";
+    githubId = 32938211;
+    name = "Benno Bielmeier";
+  };
   bbigras = {
     email = "bigras.bruno@gmail.com";
     github = "bbigras";
diff --git a/nixos/modules/services/misc/gollum.nix b/nixos/modules/services/misc/gollum.nix
index cad73a871ba6b..7275dd4bb1940 100644
--- a/nixos/modules/services/misc/gollum.nix
+++ b/nixos/modules/services/misc/gollum.nix
@@ -117,5 +117,5 @@ in
     };
   };
 
-  meta.maintainers = with lib.maintainers; [ erictapen ];
+  meta.maintainers = with lib.maintainers; [ erictapen bbenno ];
 }
diff --git a/pkgs/applications/misc/gollum/default.nix b/pkgs/applications/misc/gollum/default.nix
index cc9f9df0c6087..ebd8f0a175a85 100644
--- a/pkgs/applications/misc/gollum/default.nix
+++ b/pkgs/applications/misc/gollum/default.nix
@@ -1,37 +1,22 @@
-{ lib, stdenv, bundlerEnv, ruby, makeWrapper, bundlerUpdateScript
-, git, docutils, perl }:
+{ lib, bundlerApp, bundlerUpdateScript, ruby, makeWrapper, git, docutils }:
 
-stdenv.mkDerivation rec {
+bundlerApp rec {
   pname = "gollum";
-  # nix-shell -p bundix icu zlib cmake pkg-config openssl
-  version = (import ./gemset.nix).gollum.version;
+  exes = [ "gollum" ];
 
-  nativeBuildInputs = [ makeWrapper ];
+  inherit ruby;
+  gemdir = ./.;
 
-  dontUnpack = true;
-
-  installPhase = let
-    env = bundlerEnv {
-      name = "${pname}-${version}-gems";
-      inherit pname ruby;
-      gemdir = ./.;
-    };
-  in ''
-    mkdir -p $out/bin
-    makeWrapper ${env}/bin/gollum $out/bin/gollum \
-      --prefix PATH ":" ${lib.makeBinPath [ git docutils perl]}
-    makeWrapper ${env}/bin/gollum-migrate-tags $out/bin/gollum-migrate-tags \
-      --prefix PATH ":" ${lib.makeBinPath [ git ]}
-  '';
+  buildInputs = [ makeWrapper ];
 
   passthru.updateScript = bundlerUpdateScript "gollum";
 
   meta = with lib; {
     description = "A simple, Git-powered wiki with a sweet API and local frontend";
     homepage = "https://github.com/gollum/gollum";
-    changelog = "https://github.com/gollum/gollum/blob/v${version}/HISTORY.md";
+    changelog = "https://github.com/gollum/gollum/blob/HEAD/HISTORY.md";
     license = licenses.mit;
-    maintainers = with maintainers; [ erictapen jgillich nicknovitski ];
+    maintainers = with maintainers; [ erictapen jgillich nicknovitski bbenno ];
     platforms = platforms.unix;
   };
 }