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 }:
|
||||
|
||||
let generic = { major, version, src }:
|
||||
|
||||
let generic = { version, sha256 }:
|
||||
stdenv.mkDerivation rec {
|
||||
name = "${nameMajor}-${version}";
|
||||
nameMajor = "alloy${major}";
|
||||
pname = "alloy${lib.versions.major version}";
|
||||
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 {
|
||||
name = nameMajor;
|
||||
name = pname;
|
||||
exec = name;
|
||||
icon = name;
|
||||
desktopName = "Alloy ${major}";
|
||||
desktopName = "Alloy ${lib.versions.major version}";
|
||||
genericName = "Relational modelling tool";
|
||||
comment = meta.description;
|
||||
categories = "Development;IDE;Education;";
|
||||
|
@ -19,14 +23,14 @@ let generic = { major, version, src }:
|
|||
nativeBuildInputs = [ makeWrapper ];
|
||||
|
||||
buildCommand = ''
|
||||
jar=$out/share/alloy/${nameMajor}.jar
|
||||
jar=$out/share/alloy/${pname}.jar
|
||||
install -Dm644 ${src} $jar
|
||||
|
||||
mkdir -p $out/bin
|
||||
makeWrapper ${jre}/bin/java $out/bin/${nameMajor} --add-flags \
|
||||
"-jar $jar"
|
||||
makeWrapper ${jre}/bin/java $out/bin/${pname} --add-flags \
|
||||
"-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
|
||||
'';
|
||||
|
||||
|
@ -50,22 +54,14 @@ let generic = { major, version, src }:
|
|||
};
|
||||
|
||||
in rec {
|
||||
alloy4 = let version = "4.2_2015-02-22"; in generic {
|
||||
major = "4";
|
||||
inherit version;
|
||||
src = fetchurl {
|
||||
sha256 = "0p93v8jwx9prijpikkgmfdzb9qn8ljmvga5d9wvrkxddccjx9k28";
|
||||
url = "http://alloytools.org/download/alloy${version}.jar";
|
||||
};
|
||||
alloy5 = generic rec {
|
||||
version = "5.1.0";
|
||||
sha256 = "02k9khs4k5nc86x9pp5k3vcb0kiwdgcin46mlap4fycnr673xd53";
|
||||
};
|
||||
|
||||
alloy5 = let version = "5.1.0"; in generic {
|
||||
major = "5";
|
||||
inherit version;
|
||||
src = fetchurl {
|
||||
sha256 = "02k9khs4k5nc86x9pp5k3vcb0kiwdgcin46mlap4fycnr673xd53";
|
||||
url = "https://github.com/AlloyTools/org.alloytools.alloy/releases/download/v${version}/org.alloytools.alloy.dist.jar";
|
||||
};
|
||||
alloy6 = generic rec {
|
||||
version = "6.0.0";
|
||||
sha256 = "sha256-rA7mNxcu0DWkykMyfV4JwFmQqg0HOIcwjjD4jCRxNww=";
|
||||
};
|
||||
|
||||
alloy = alloy5;
|
||||
|
|
|
@ -13873,8 +13873,8 @@ with pkgs;
|
|||
inherit (callPackage ../development/tools/alloy {
|
||||
jre = jre8; # TODO: remove override https://github.com/NixOS/nixpkgs/pull/89731
|
||||
})
|
||||
alloy4
|
||||
alloy5
|
||||
alloy6
|
||||
alloy;
|
||||
|
||||
altair = callPackage ../development/tools/altair-graphql-client { };
|
||||
|
|
Loading…
Reference in a new issue