-
-
Notifications
You must be signed in to change notification settings - Fork 15k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #95114 from raboof/inkscape-extensions
inkscape: allow loading external extensions
- Loading branch information
Showing
3 changed files
with
62 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
{ stdenv | ||
, fetchFromGitHub | ||
}: | ||
|
||
{ | ||
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 stdenv.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; | ||
}; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
{ lib | ||
, inkscape | ||
, symlinkJoin | ||
, makeWrapper | ||
, inkscapeExtensions ? [] | ||
}: | ||
|
||
symlinkJoin { | ||
name = "inkscape-with-extensions-${lib.getVersion inkscape}"; | ||
|
||
paths = [ inkscape ] ++ inkscapeExtensions; | ||
|
||
buildInputs = [ makeWrapper ]; | ||
|
||
postBuild = '' | ||
rm -f $out/bin/inkscape | ||
makeWrapper "${inkscape}/bin/inkscape" "$out/bin/inkscape" --set INKSCAPE_DATADIR "$out/share" | ||
''; | ||
|
||
inherit (inkscape) meta; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters