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
46 lines
1.5 KiB
Nix
46 lines
1.5 KiB
Nix
{ lib, stdenv, fetchFromGitLab, xdg_utils }:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "anarchism";
|
|
version = "15.3-1";
|
|
|
|
src = fetchFromGitLab {
|
|
domain = "salsa.debian.org";
|
|
owner = "debian";
|
|
repo = pname;
|
|
rev = "debian/${version}";
|
|
sha256 = "04ylk0y5b3jml2awmyz7m1hnymni8y1n83m0k6ychdh0px8frhm5";
|
|
};
|
|
|
|
phases = [ "unpackPhase" "postPatch" "installPhase" ];
|
|
|
|
postPatch = ''
|
|
substituteInPlace debian/anarchism.desktop \
|
|
--replace "/usr/bin/xdg-open" "${xdg_utils}/bin/xdg-open"
|
|
substituteInPlace debian/anarchism.desktop \
|
|
--replace "file:///usr" "file://$out"
|
|
'';
|
|
|
|
installPhase = ''
|
|
mkdir -p $out/share/doc/anarchism $out/share/applications $out/share/icons/hicolor/scalable/apps
|
|
cp -r {html,markdown} $out/share/doc/anarchism
|
|
cp debian/anarchism.svg $out/share/icons/hicolor/scalable/apps
|
|
cp debian/anarchism.desktop $out/share/applications
|
|
'';
|
|
|
|
meta = with lib; {
|
|
homepage = "http://www.anarchistfaq.org/";
|
|
changelog = "http://anarchism.pageabode.com/afaq/new.html";
|
|
description = "Exhaustive exploration of Anarchist theory and practice";
|
|
longDescription = ''
|
|
The Anarchist FAQ is an excellent source of information regarding Anarchist
|
|
(libertarian socialist) theory and practice. It covers all major topics,
|
|
from the basics of Anarchism to very specific discussions of politics,
|
|
social organization, and economics.
|
|
'';
|
|
license = licenses.gpl2Plus;
|
|
maintainers = with maintainers; [ davidak ];
|
|
platforms = with platforms; all;
|
|
};
|
|
}
|