uboot: (firmwareOdroidC2/C4) don't invoke patch tool, use patches = [] instead
https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/setup.sh#L948 this can do it nicely. Signed-off-by: Anton Arapov <anton@deadbeef.mx>
This commit is contained in:
commit
56de2bcd43
30691 changed files with 3076956 additions and 0 deletions
135
pkgs/applications/misc/sweethome3d/default.nix
Normal file
135
pkgs/applications/misc/sweethome3d/default.nix
Normal file
|
|
@ -0,0 +1,135 @@
|
|||
{ lib
|
||||
, stdenv
|
||||
, fetchurl
|
||||
, makeWrapper
|
||||
, makeDesktopItem
|
||||
# sweethome3d 6.5.2 does not yet fully build&run with jdk 9 and later?
|
||||
, jdk8
|
||||
, jre8
|
||||
, ant
|
||||
, gtk3
|
||||
, gsettings-desktop-schemas
|
||||
, p7zip
|
||||
, autoPatchelfHook
|
||||
, libXxf86vm
|
||||
, unzip
|
||||
}:
|
||||
|
||||
let
|
||||
|
||||
# TODO: Should we move this to `lib`? Seems like its would be useful in many cases.
|
||||
extensionOf = filePath:
|
||||
lib.concatStringsSep "." (lib.tail (lib.splitString "." (builtins.baseNameOf filePath)));
|
||||
|
||||
installIcons = iconName: icons: lib.concatStringsSep "\n" (lib.mapAttrsToList (size: iconFile: ''
|
||||
mkdir -p "$out/share/icons/hicolor/${size}/apps"
|
||||
ln -s -T "${iconFile}" "$out/share/icons/hicolor/${size}/apps/${iconName}.${extensionOf iconFile}"
|
||||
'') icons);
|
||||
|
||||
mkSweetHome3D =
|
||||
{ pname, module, version, src, license, description, desktopName, icons }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
inherit pname version src description;
|
||||
exec = lib.toLower module;
|
||||
sweethome3dItem = makeDesktopItem {
|
||||
inherit exec desktopName;
|
||||
name = pname;
|
||||
icon = pname;
|
||||
comment = description;
|
||||
genericName = "Computer Aided (Interior) Design";
|
||||
categories = [ "Graphics" "2DGraphics" "3DGraphics" ];
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
addAutoPatchelfSearchPath ${jre8}/lib/openjdk/jre/lib/
|
||||
autoPatchelf lib
|
||||
|
||||
# Nix cannot see the runtime references to the paths we just patched in
|
||||
# once they've been compressed into the .jar. Scan for and remember them
|
||||
# as plain text so they don't get overlooked.
|
||||
find . -name '*.so' | xargs strings | { grep '/nix/store' || :; } >> ./.jar-paths
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [ makeWrapper unzip autoPatchelfHook ];
|
||||
buildInputs = [ ant jdk8 p7zip gtk3 gsettings-desktop-schemas libXxf86vm ];
|
||||
|
||||
buildPhase = ''
|
||||
runHook preBuild
|
||||
|
||||
ant furniture textures help
|
||||
mkdir -p $out/share/{java,applications}
|
||||
mv "build/"*.jar $out/share/java/.
|
||||
ant
|
||||
|
||||
runHook postBuild
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
mkdir -p $out/bin
|
||||
cp install/${module}-${version}.jar $out/share/java/.
|
||||
|
||||
${installIcons pname icons}
|
||||
|
||||
cp "${sweethome3dItem}/share/applications/"* $out/share/applications
|
||||
|
||||
# MESA_GL_VERSION_OVERRIDE is needed since the update from MESA 19.3.3 to 20.0.2:
|
||||
# without it a "Profiles [GL4bc, GL3bc, GL2, GLES1] not available on device null"
|
||||
# exception is thrown on startup.
|
||||
# https://discourse.nixos.org/t/glx-not-recognised-after-mesa-update/6753
|
||||
makeWrapper ${jre8}/bin/java $out/bin/$exec \
|
||||
--set MESA_GL_VERSION_OVERRIDE 2.1 \
|
||||
--prefix XDG_DATA_DIRS : "$XDG_ICON_DIRS:${gtk3.out}/share:${gsettings-desktop-schemas}/share:$out/share:$GSETTINGS_SCHEMAS_PATH" \
|
||||
--add-flags "-Dsun.java2d.opengl=true -jar $out/share/java/${module}-${version}.jar -cp $out/share/java/Furniture.jar:$out/share/java/Textures.jar:$out/share/java/Help.jar -d${toString stdenv.hostPlatform.parsed.cpu.bits}"
|
||||
|
||||
|
||||
# remember the store paths found inside the .jar libraries. note that
|
||||
# which file they are in does not matter in particular, just that some
|
||||
# file somewhere lists them in plain-text
|
||||
mkdir -p $out/nix-support
|
||||
cp .jar-paths $out/nix-support/depends
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
dontStrip = true;
|
||||
|
||||
meta = {
|
||||
homepage = "http://www.sweethome3d.com/index.jsp";
|
||||
inherit description;
|
||||
inherit license;
|
||||
maintainers = [ lib.maintainers.edwtjo ];
|
||||
platforms = lib.platforms.linux;
|
||||
};
|
||||
};
|
||||
|
||||
d2u = lib.replaceChars ["."] ["_"];
|
||||
|
||||
in {
|
||||
|
||||
application = mkSweetHome3D rec {
|
||||
pname = lib.toLower module + "-application";
|
||||
version = "6.6";
|
||||
module = "SweetHome3D";
|
||||
description = "Design and visualize your future home";
|
||||
license = lib.licenses.gpl2Plus;
|
||||
src = fetchurl {
|
||||
url = "mirror://sourceforge/sweethome3d/${module}-${version}-src.zip";
|
||||
sha256 = "sha256-CnVXpmodmyoZdqmt7OgRyzuLeDhkPhrAS/CldFM8SQs=";
|
||||
};
|
||||
desktopName = "Sweet Home 3D";
|
||||
icons = {
|
||||
"32x32" = fetchurl {
|
||||
url = "http://sweethome3d.cvs.sourceforge.net/viewvc/sweethome3d/SweetHome3D/deploy/SweetHome3DIcon32x32.png";
|
||||
sha256 = "1r2fhfg27mx00nfv0qj66rhf719s2g1vhdis7bdc9mqk9x0mb0ir";
|
||||
};
|
||||
"48x48" = fetchurl {
|
||||
url = "http://sweethome3d.cvs.sourceforge.net/viewvc/sweethome3d/SweetHome3D/deploy/SweetHome3DIcon48x48.png";
|
||||
sha256 = "1ap6d75dyqqvx21wddvn8vw2apq3v803vmbxdriwd0dw9rq3zn4g";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
}
|
||||
114
pkgs/applications/misc/sweethome3d/editors.nix
Normal file
114
pkgs/applications/misc/sweethome3d/editors.nix
Normal file
|
|
@ -0,0 +1,114 @@
|
|||
{ lib
|
||||
, stdenv
|
||||
, fetchurl
|
||||
, makeWrapper
|
||||
, makeDesktopItem
|
||||
# sweethome3d 6.5.2 does not yet fully build&run with jdk 9 and later?
|
||||
, jdk8
|
||||
, jre8
|
||||
, ant
|
||||
, gtk3
|
||||
, gsettings-desktop-schemas
|
||||
, sweethome3dApp
|
||||
, unzip
|
||||
}:
|
||||
|
||||
let
|
||||
|
||||
sweetExec = with lib;
|
||||
m: "sweethome3d-"
|
||||
+ removeSuffix "libraryeditor" (toLower m)
|
||||
+ "-editor";
|
||||
|
||||
applicationSrc = stdenv.mkDerivation {
|
||||
name = "application-src";
|
||||
src = sweethome3dApp.src;
|
||||
nativeBuildInputs = [ unzip ];
|
||||
buildPhase = "";
|
||||
installPhase = "cp -r . $out";
|
||||
};
|
||||
|
||||
mkEditorProject =
|
||||
{ pname, module, version, src, license, description, desktopName }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
application = sweethome3dApp;
|
||||
inherit pname module version src description;
|
||||
exec = sweetExec module;
|
||||
editorItem = makeDesktopItem {
|
||||
inherit exec desktopName;
|
||||
name = pname;
|
||||
comment = description;
|
||||
genericName = "Computer Aided (Interior) Design";
|
||||
categories = [ "Graphics" "2DGraphics" "3DGraphics" ];
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ makeWrapper unzip ];
|
||||
buildInputs = [ ant jre8 jdk8 gtk3 gsettings-desktop-schemas ];
|
||||
|
||||
postPatch = ''
|
||||
sed -i -e 's,../SweetHome3D,${applicationSrc},g' build.xml
|
||||
sed -i -e 's,lib/macosx/java3d-1.6/jogl-all.jar,lib/java3d-1.6/jogl-all.jar,g' build.xml
|
||||
'';
|
||||
|
||||
buildPhase = ''
|
||||
runHook preBuild
|
||||
|
||||
ant -lib ${applicationSrc}/libtest -lib ${applicationSrc}/lib -lib ${jdk8}/lib
|
||||
|
||||
runHook postBuild
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin
|
||||
mkdir -p $out/share/{java,applications}
|
||||
cp ${module}-${version}.jar $out/share/java/.
|
||||
cp "${editorItem}/share/applications/"* $out/share/applications
|
||||
makeWrapper ${jre8}/bin/java $out/bin/$exec \
|
||||
--prefix XDG_DATA_DIRS : "$XDG_ICON_DIRS:${gtk3.out}/share:${gsettings-desktop-schemas}/share:$out/share:$GSETTINGS_SCHEMAS_PATH" \
|
||||
--add-flags "-jar $out/share/java/${module}-${version}.jar -d${toString stdenv.hostPlatform.parsed.cpu.bits}"
|
||||
'';
|
||||
|
||||
dontStrip = true;
|
||||
|
||||
meta = {
|
||||
homepage = "http://www.sweethome3d.com/index.jsp";
|
||||
inherit description;
|
||||
inherit license;
|
||||
maintainers = [ lib.maintainers.edwtjo ];
|
||||
platforms = lib.platforms.linux;
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
d2u = lib.replaceChars ["."] ["_"];
|
||||
|
||||
in {
|
||||
|
||||
textures-editor = mkEditorProject rec {
|
||||
version = "1.7";
|
||||
module = "TexturesLibraryEditor";
|
||||
pname = module;
|
||||
description = "Easily create SH3T files and edit the properties of the texture images it contain";
|
||||
license = lib.licenses.gpl2Plus;
|
||||
src = fetchurl {
|
||||
url = "mirror://sourceforge/sweethome3d/${module}-${version}-src.zip";
|
||||
sha256 = "03vb9y645qzffxxdhgbjb0d98k3lafxckg2vh2s86j62b6357d0h";
|
||||
};
|
||||
desktopName = "Sweet Home 3D - Textures Library Editor";
|
||||
};
|
||||
|
||||
furniture-editor = mkEditorProject rec {
|
||||
version = "1.28";
|
||||
module = "FurnitureLibraryEditor";
|
||||
pname = module;
|
||||
description = "Quickly create SH3F files and edit the properties of the 3D models it contain";
|
||||
license = lib.licenses.gpl2;
|
||||
src = fetchurl {
|
||||
url = "mirror://sourceforge/sweethome3d/${module}-${version}-src.zip";
|
||||
sha256 = "sha256-r5xJlUctUdcknJfm8rbz+bdzFhqgHsHpHwxEC4mItws=";
|
||||
};
|
||||
desktopName = "Sweet Home 3D - Furniture Library Editor";
|
||||
};
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue