2021-01-11 07:54:33 +00:00
|
|
|
{ lib, stdenv
|
2020-08-10 22:30:04 +01:00
|
|
|
, fetchFromGitHub
|
2020-09-14 12:42:17 +01:00
|
|
|
, runCommand
|
|
|
|
, inkcut
|
2021-06-24 20:17:00 +01:00
|
|
|
, callPackage
|
2020-08-10 22:30:04 +01:00
|
|
|
}:
|
|
|
|
|
|
|
|
{
|
2021-06-24 20:17:00 +01:00
|
|
|
applytransforms = callPackage ./extensions/applytransforms { };
|
|
|
|
|
2020-08-10 22:30:04 +01:00
|
|
|
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
|
|
|
|
'';
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2020-08-10 22:30:04 +01:00
|
|
|
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;
|
|
|
|
};
|
|
|
|
};
|
2020-09-14 12:42:17 +01:00
|
|
|
inkcut = (runCommand "inkcut-inkscape-plugin" {} ''
|
|
|
|
mkdir -p $out/share/inkscape/extensions
|
|
|
|
cp ${inkcut}/share/inkscape/extensions/* $out/share/inkscape/extensions
|
|
|
|
'');
|
2020-08-10 22:30:04 +01:00
|
|
|
}
|