mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-15 14:26:33 +01:00
a045860080
wonderdraft: 1.1.7.3 -> 1.1.8.2b
62 lines
1.5 KiB
Nix
62 lines
1.5 KiB
Nix
{ lib
|
|
, stdenv
|
|
, requireFile
|
|
, dpkg
|
|
, xorg
|
|
, libGL
|
|
, alsa-lib
|
|
, pulseaudio
|
|
}:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "wonderdraft";
|
|
version = "1.1.8.2b";
|
|
|
|
src = requireFile {
|
|
name = "Wonderdraft-${version}-Linux64.deb";
|
|
url = "https://wonderdraft.net/";
|
|
hash = "sha256-3eYnEH6P94z9axFsrkJA4QMcHyg/gNRczqL3h5Sc2Tg=";
|
|
};
|
|
sourceRoot = ".";
|
|
unpackCmd = "${dpkg}/bin/dpkg-deb -x $curSrc .";
|
|
|
|
dontConfigure = true;
|
|
dontBuild = true;
|
|
|
|
installPhase = ''
|
|
runHook preInstall
|
|
mkdir -p $out/bin
|
|
cp -R usr/share opt $out/
|
|
substituteInPlace \
|
|
$out/share/applications/Wonderdraft.desktop \
|
|
--replace /opt/ $out/opt/
|
|
ln -s $out/opt/Wonderdraft/Wonderdraft.x86_64 $out/bin/Wonderdraft.x86_64
|
|
runHook postInstall
|
|
'';
|
|
preFixup = let
|
|
libPath = lib.makeLibraryPath [
|
|
xorg.libXcursor
|
|
xorg.libXinerama
|
|
xorg.libXrandr
|
|
xorg.libX11
|
|
xorg.libXi
|
|
libGL
|
|
alsa-lib
|
|
pulseaudio
|
|
];
|
|
in ''
|
|
patchelf \
|
|
--set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
|
|
--set-rpath "${libPath}" \
|
|
$out/opt/Wonderdraft/Wonderdraft.x86_64
|
|
'';
|
|
|
|
meta = with lib; {
|
|
homepage = "https://wonderdraft.net/";
|
|
description = "Mapmaking tool for Tabletop Roleplaying Games, designed for city, region, or world scale";
|
|
license = licenses.unfree;
|
|
platforms = [ "x86_64-linux" ];
|
|
maintainers = with maintainers; [ jsusk ];
|
|
sourceProvenance = with sourceTypes; [ binaryNativeCode ];
|
|
};
|
|
}
|