diff options
author | Artturi <Artturin@artturin.com> | 2022-04-14 11:46:19 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-14 11:46:19 +0300 |
commit | 1690820ab5787eb9bd5c1bc33a4e2c9ac3011983 (patch) | |
tree | 54ecc06823578132d9a2849bdff463382dcc1b46 /pkgs/applications/editors | |
parent | a2e8bfe9cb8b0901643f97d323a334a976413f92 (diff) | |
parent | cc222b4fea6606005578c7aede3288a98516db1d (diff) | |
download | nixpkgs-1690820ab5787eb9bd5c1bc33a4e2c9ac3011983.tar nixpkgs-1690820ab5787eb9bd5c1bc33a4e2c9ac3011983.tar.gz nixpkgs-1690820ab5787eb9bd5c1bc33a4e2c9ac3011983.tar.bz2 nixpkgs-1690820ab5787eb9bd5c1bc33a4e2c9ac3011983.tar.lz nixpkgs-1690820ab5787eb9bd5c1bc33a4e2c9ac3011983.tar.xz nixpkgs-1690820ab5787eb9bd5c1bc33a4e2c9ac3011983.tar.zst nixpkgs-1690820ab5787eb9bd5c1bc33a4e2c9ac3011983.zip |
Merge pull request #134523 from reedrw/bluej-gsettings-fix
bluej: fix gsettings schemas
Diffstat (limited to 'pkgs/applications/editors')
-rw-r--r-- | pkgs/applications/editors/bluej/default.nix | 43 |
1 files changed, 35 insertions, 8 deletions
diff --git a/pkgs/applications/editors/bluej/default.nix b/pkgs/applications/editors/bluej/default.nix index b8a651b2d44..bfc413c24ad 100644 --- a/pkgs/applications/editors/bluej/default.nix +++ b/pkgs/applications/editors/bluej/default.nix @@ -1,8 +1,9 @@ -{ lib, stdenv, fetchurl, makeWrapper, jdk }: +{ lib, stdenv, fetchurl, jdk, glib, wrapGAppsHook }: stdenv.mkDerivation rec { pname = "bluej"; version = "5.0.3"; + src = fetchurl { # We use the deb here. First instinct might be to go for the "generic" JAR # download, but that is actually a graphical installer that is much harder @@ -11,18 +12,44 @@ stdenv.mkDerivation rec { sha256 = "sha256-OarqmptxZc7xEEYeoCVqHXkAvfzfSYx5nUp/iWPyoqw="; }; - nativeBuildInputs = [ makeWrapper ]; + nativeBuildInputs = [ wrapGAppsHook ]; + buildInputs = [ glib ]; - unpackPhase = '' - ar xf $src - tar xf data.tar.xz + sourceRoot = "."; + preUnpack = '' + unpackCmdHooks+=(_tryDebData) + _tryDebData() { + if ! [[ "$1" =~ \.deb$ ]]; then return 1; fi + ar xf "$1" + if ! [[ -e data.tar.xz ]]; then return 1; fi + unpackFile data.tar.xz + } ''; installPhase = '' - mkdir -p $out - cp -r usr/* $out + runHook preInstall + + if [ -n "$prefix" ]; then + mkdir -p "$prefix" + fi + + mkdir -p "$out" + + if shopt -q dotglob; then dotglobOpt=$?; else dotglobOpt=$?; fi + shopt -s dotglob + for file in usr/*; do + cp -R "$file" "$out" + done + if (( !dotglobOpt )); then shopt -u dotglob; fi + + runHook postInstall + ''; + + dontWrapGApps = true; + preFixup = '' makeWrapper ${jdk}/bin/java $out/bin/bluej \ + "''${gappsWrapperArgs[@]}" \ --add-flags "-Djavafx.embed.singleThread=true -Dawt.useSystemAAFontSettings=on -Xmx512M -cp \"$out/share/bluej/bluej.jar\" bluej.Boot" ''; @@ -30,7 +57,7 @@ stdenv.mkDerivation rec { description = "A simple integrated development environment for Java"; homepage = "https://www.bluej.org/"; license = licenses.gpl2ClasspathPlus; - maintainers = [ maintainers.chvp ]; + maintainers = with maintainers; [ chvp ]; platforms = platforms.unix; }; } |