Merge pull request #145305 from suhr/alloy6
This commit is contained in:
commit
cb6e9b19aa
2 changed files with 21 additions and 25 deletions
|
@ -1,16 +1,20 @@
|
||||||
{ lib, stdenv, fetchurl, jre, makeWrapper, makeDesktopItem }:
|
{ lib, stdenv, fetchurl, jre, makeWrapper, makeDesktopItem }:
|
||||||
|
|
||||||
let generic = { major, version, src }:
|
let generic = { version, sha256 }:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
name = "${nameMajor}-${version}";
|
pname = "alloy${lib.versions.major version}";
|
||||||
nameMajor = "alloy${major}";
|
inherit version;
|
||||||
|
|
||||||
|
src = fetchurl {
|
||||||
|
inherit sha256;
|
||||||
|
url = "https://github.com/AlloyTools/org.alloytools.alloy/releases/download/v${version}/org.alloytools.alloy.dist.jar";
|
||||||
|
};
|
||||||
|
|
||||||
desktopItem = makeDesktopItem rec {
|
desktopItem = makeDesktopItem rec {
|
||||||
name = nameMajor;
|
name = pname;
|
||||||
exec = name;
|
exec = name;
|
||||||
icon = name;
|
icon = name;
|
||||||
desktopName = "Alloy ${major}";
|
desktopName = "Alloy ${lib.versions.major version}";
|
||||||
genericName = "Relational modelling tool";
|
genericName = "Relational modelling tool";
|
||||||
comment = meta.description;
|
comment = meta.description;
|
||||||
categories = "Development;IDE;Education;";
|
categories = "Development;IDE;Education;";
|
||||||
|
@ -19,14 +23,14 @@ let generic = { major, version, src }:
|
||||||
nativeBuildInputs = [ makeWrapper ];
|
nativeBuildInputs = [ makeWrapper ];
|
||||||
|
|
||||||
buildCommand = ''
|
buildCommand = ''
|
||||||
jar=$out/share/alloy/${nameMajor}.jar
|
jar=$out/share/alloy/${pname}.jar
|
||||||
install -Dm644 ${src} $jar
|
install -Dm644 ${src} $jar
|
||||||
|
|
||||||
mkdir -p $out/bin
|
mkdir -p $out/bin
|
||||||
makeWrapper ${jre}/bin/java $out/bin/${nameMajor} --add-flags \
|
makeWrapper ${jre}/bin/java $out/bin/${pname} --add-flags \
|
||||||
"-jar $jar"
|
"-jar $jar"
|
||||||
|
|
||||||
install -Dm644 ${./icon.png} $out/share/pixmaps/${nameMajor}.png
|
install -Dm644 ${./icon.png} $out/share/pixmaps/${pname}.png
|
||||||
cp -r ${desktopItem}/share/applications $out/share
|
cp -r ${desktopItem}/share/applications $out/share
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
@ -50,22 +54,14 @@ let generic = { major, version, src }:
|
||||||
};
|
};
|
||||||
|
|
||||||
in rec {
|
in rec {
|
||||||
alloy4 = let version = "4.2_2015-02-22"; in generic {
|
alloy5 = generic rec {
|
||||||
major = "4";
|
version = "5.1.0";
|
||||||
inherit version;
|
sha256 = "02k9khs4k5nc86x9pp5k3vcb0kiwdgcin46mlap4fycnr673xd53";
|
||||||
src = fetchurl {
|
|
||||||
sha256 = "0p93v8jwx9prijpikkgmfdzb9qn8ljmvga5d9wvrkxddccjx9k28";
|
|
||||||
url = "http://alloytools.org/download/alloy${version}.jar";
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
alloy5 = let version = "5.1.0"; in generic {
|
alloy6 = generic rec {
|
||||||
major = "5";
|
version = "6.0.0";
|
||||||
inherit version;
|
sha256 = "sha256-rA7mNxcu0DWkykMyfV4JwFmQqg0HOIcwjjD4jCRxNww=";
|
||||||
src = fetchurl {
|
|
||||||
sha256 = "02k9khs4k5nc86x9pp5k3vcb0kiwdgcin46mlap4fycnr673xd53";
|
|
||||||
url = "https://github.com/AlloyTools/org.alloytools.alloy/releases/download/v${version}/org.alloytools.alloy.dist.jar";
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
alloy = alloy5;
|
alloy = alloy5;
|
||||||
|
|
|
@ -13873,8 +13873,8 @@ with pkgs;
|
||||||
inherit (callPackage ../development/tools/alloy {
|
inherit (callPackage ../development/tools/alloy {
|
||||||
jre = jre8; # TODO: remove override https://github.com/NixOS/nixpkgs/pull/89731
|
jre = jre8; # TODO: remove override https://github.com/NixOS/nixpkgs/pull/89731
|
||||||
})
|
})
|
||||||
alloy4
|
|
||||||
alloy5
|
alloy5
|
||||||
|
alloy6
|
||||||
alloy;
|
alloy;
|
||||||
|
|
||||||
altair = callPackage ../development/tools/altair-graphql-client { };
|
altair = callPackage ../development/tools/altair-graphql-client { };
|
||||||
|
|
Loading…
Reference in a new issue