4a7f99d55d
Part of: https://github.com/NixOS/nixpkgs/issues/108938 meta = with stdenv.lib; is a widely used pattern. We want to slowly remove the `stdenv.lib` indirection and encourage people to use `lib` directly. Thus let’s start with the meta field. This used a rewriting script to mostly automatically replace all occurances of this pattern, and add the `lib` argument to the package header if it doesn’t exist yet. The script in its current form is available at https://cs.tvl.fyi/depot@2f807d7f141068d2d60676a89213eaa5353ca6e0/-/blob/users/Profpatsch/nixpkgs-rewriter/default.nix
38 lines
1.1 KiB
Nix
38 lines
1.1 KiB
Nix
{ lib, stdenv, bundlerEnv, ruby, makeWrapper, bundlerUpdateScript
|
|
, git }:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "gollum";
|
|
# nix-shell -p bundix icu zlib cmake pkg-config openssl
|
|
version = (import ./gemset.nix).gollum.version;
|
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
phases = [ "installPhase" ];
|
|
|
|
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 ":" ${stdenv.lib.makeBinPath [ git ]}
|
|
makeWrapper ${env}/bin/gollum-migrate-tags $out/bin/gollum-migrate-tags \
|
|
--prefix PATH ":" ${stdenv.lib.makeBinPath [ git ]}
|
|
'';
|
|
|
|
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";
|
|
license = licenses.mit;
|
|
maintainers = with maintainers; [ jgillich primeos nicknovitski ];
|
|
platforms = platforms.unix;
|
|
};
|
|
}
|