feat(pkgs): add openwebstart
All checks were successful
Build packages / Build derivations (push) Successful in 1m45s
All checks were successful
Build packages / Build derivations (push) Successful in 1m45s
This commit is contained in:
parent
c31b243a1f
commit
6aa35b5592
2 changed files with 67 additions and 0 deletions
|
@ -3,4 +3,5 @@ final: prev: {
|
|||
vineflower = prev.callPackage ./vineflower.nix {};
|
||||
koi = prev.kdePackages.callPackage ./koi.nix {};
|
||||
asus-numpad = prev.callPackage ./asus-numpad.nix {};
|
||||
openwebstart = prev.callPackage ./openwebstart.nix {};
|
||||
}
|
||||
|
|
66
pkgs/openwebstart.nix
Normal file
66
pkgs/openwebstart.nix
Normal file
|
@ -0,0 +1,66 @@
|
|||
{
|
||||
stdenv,
|
||||
fetchurl,
|
||||
makeWrapper,
|
||||
makeDesktopItem,
|
||||
copyDesktopItems,
|
||||
dpkg,
|
||||
openjdk8,
|
||||
}:
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "OpenWebStart";
|
||||
version = "1.5.2";
|
||||
|
||||
src = fetchurl {
|
||||
url = with finalAttrs; "https://github.com/karakun/OpenWebStart/releases/download/v${version}/OpenWebStart_linux_${builtins.replaceStrings ["."] ["_"] version}.deb";
|
||||
hash = "sha256-thB/JWbF/Xk/PLurwXvWwzQTyCeV1hU7Zm8BjrG6lS0=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [dpkg makeWrapper copyDesktopItems];
|
||||
|
||||
sourceRoot = "opt/OpenWebStart";
|
||||
|
||||
unpackPhase = ''
|
||||
dpkg-deb -x $src .
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/lib
|
||||
cp openwebstart.jar $out/lib/
|
||||
|
||||
makeWrapper ${openjdk8}/bin/java $out/bin/openwebstart \
|
||||
--add-flags "-cp $out/lib/openwebstart.jar com.openwebstart.launcher.OpenWebStartLauncher"
|
||||
|
||||
makeWrapper ${openjdk8}/bin/java $out/bin/openwebstart-settings \
|
||||
--add-flags "-cp $out/lib/openwebstart.jar com.openwebstart.launcher.ControlPanelLauncher"
|
||||
|
||||
mkdir -p $out/share/pixmaps
|
||||
cp App-Icon-512.png $out/share/pixmaps/openwebstart-settings.png
|
||||
cp Icon-512.png $out/share/pixmaps/openwebstart.png
|
||||
'';
|
||||
|
||||
dontBuild = true;
|
||||
dontCheck = true;
|
||||
|
||||
desktopFiles = [
|
||||
(makeDesktopItem {
|
||||
name = "OpenWebStart Settings";
|
||||
type = "Application";
|
||||
desktopName = "OpenWebStart Settings";
|
||||
exec = "openwebstart-settings %U";
|
||||
icon = "openwebstart-settings";
|
||||
})
|
||||
|
||||
(makeDesktopItem {
|
||||
name = "OpenWebStart";
|
||||
type = "Application";
|
||||
desktopName = "OpenWebStart";
|
||||
noDisplay = true;
|
||||
exec = "openwebstart %f";
|
||||
icon = "openwebstart-settings";
|
||||
mimeTypes = ["application/x-java-jnlp-file"];
|
||||
})
|
||||
];
|
||||
|
||||
meta.mainProgram = "openwebstart-settings";
|
||||
})
|
Loading…
Add table
Add a link
Reference in a new issue