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
44 lines
1.2 KiB
Nix
44 lines
1.2 KiB
Nix
{ lib, stdenv
|
|
, fetchFromGitHub
|
|
, runCommand
|
|
, inkcut
|
|
}:
|
|
|
|
{
|
|
hexmap = stdenv.mkDerivation {
|
|
name = "hexmap";
|
|
version = "2020-06-06";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "lifelike";
|
|
repo = "hexmapextension";
|
|
rev = "11401e23889318bdefb72df6980393050299d8cc";
|
|
sha256 = "1a4jhva624mbljj2k43wzi6hrxacjz4626jfk9y2fg4r4sga22mm";
|
|
};
|
|
|
|
preferLocalBuild = true;
|
|
|
|
installPhase = ''
|
|
runHook preInstall
|
|
|
|
mkdir -p "$out/share/inkscape/extensions"
|
|
cp -p *.inx *.py "$out/share/inkscape/extensions/"
|
|
find "$out/share/inkscape/extensions/" -name "*.py" -exec chmod +x {} \;
|
|
|
|
runHook postInstall
|
|
'';
|
|
|
|
meta = with lib; {
|
|
description = "This is an extension for creating hex grids in Inkscape. It can also be used to make brick patterns of staggered rectangles";
|
|
homepage = "https://github.com/lifelike/hexmapextension";
|
|
license = licenses.gpl2Plus;
|
|
maintainers = [ maintainers.raboof ];
|
|
platforms = platforms.all;
|
|
};
|
|
};
|
|
inkcut = (runCommand "inkcut-inkscape-plugin" {} ''
|
|
mkdir -p $out/share/inkscape/extensions
|
|
cp ${inkcut}/share/inkscape/extensions/* $out/share/inkscape/extensions
|
|
'');
|
|
}
|