Merge pull request #214728 from Dettorer/update-digital
digital: 0.29 -> 0.30
This commit is contained in:
commit
c2166eea48
|
@ -4,8 +4,8 @@
|
||||||
|
|
||||||
let
|
let
|
||||||
pkgDescription = "A digital logic designer and circuit simulator.";
|
pkgDescription = "A digital logic designer and circuit simulator.";
|
||||||
version = "0.29";
|
version = "0.30";
|
||||||
buildDate = "2022-02-11T18:10:34+01:00"; # v0.29 commit date
|
buildDate = "2023-02-03T08:00:56+01:00"; # v0.30 commit date
|
||||||
|
|
||||||
desktopItem = makeDesktopItem {
|
desktopItem = makeDesktopItem {
|
||||||
type = "Application";
|
type = "Application";
|
||||||
|
@ -24,7 +24,8 @@ let
|
||||||
# inspect the .git folder to find the version number we are building, we then
|
# inspect the .git folder to find the version number we are building, we then
|
||||||
# provide that version number manually as a property.
|
# provide that version number manually as a property.
|
||||||
# (see https://github.com/hneemann/Digital/issues/289#issuecomment-513721481)
|
# (see https://github.com/hneemann/Digital/issues/289#issuecomment-513721481)
|
||||||
mvnOptions = "-Pno-git-rev -Dgit.commit.id.describe=${version} -Dproject.build.outputTimestamp=${buildDate}";
|
# Also use the commit date as a build and output timestamp.
|
||||||
|
mvnOptions = "-Pno-git-rev -Dgit.commit.id.describe=${version} -Dproject.build.outputTimestamp=${buildDate} -DbuildTimestamp=${buildDate}";
|
||||||
in
|
in
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "digital";
|
pname = "digital";
|
||||||
|
@ -33,20 +34,16 @@ stdenv.mkDerivation rec {
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "hneemann";
|
owner = "hneemann";
|
||||||
repo = "Digital";
|
repo = "Digital";
|
||||||
rev = "287dd939d6f2d4d02c0d883c6178c3425c28d39c";
|
rev = "932791eb6486d04f2ea938d83bcdb71b56d3a3f6";
|
||||||
sha256 = "o5gaExUTTbk6WgQVw7/IeXhpNkj1BLkwD752snQqjIg=";
|
sha256 = "cDykYlcFvDLFBy9UnX07iCR2LCq28SNU+h9vRT/AoJM=";
|
||||||
};
|
};
|
||||||
|
|
||||||
# Use fixed dates in the pom.xml and upgrade the jar and assembly plugins to
|
|
||||||
# a version where they support reproducible builds
|
|
||||||
patches = [ ./pom.xml.patch ];
|
|
||||||
|
|
||||||
# Fetching maven dependencies from "central" needs the network at build phase,
|
# Fetching maven dependencies from "central" needs the network at build phase,
|
||||||
# we do that in this extra derivation that explicitely specifies its
|
# we do that in this extra derivation that explicitely specifies its
|
||||||
# outputHash to ensure determinism.
|
# outputHash to ensure determinism.
|
||||||
mavenDeps = stdenv.mkDerivation {
|
mavenDeps = stdenv.mkDerivation {
|
||||||
name = "${pname}-${version}-maven-deps";
|
name = "${pname}-${version}-maven-deps";
|
||||||
inherit src nativeBuildInputs version patches postPatch;
|
inherit src nativeBuildInputs version;
|
||||||
dontFixup = true;
|
dontFixup = true;
|
||||||
buildPhase = ''
|
buildPhase = ''
|
||||||
mvn package ${mvnOptions} -Dmaven.repo.local=$out
|
mvn package ${mvnOptions} -Dmaven.repo.local=$out
|
||||||
|
@ -62,15 +59,11 @@ stdenv.mkDerivation rec {
|
||||||
'';
|
'';
|
||||||
outputHashAlgo = "sha256";
|
outputHashAlgo = "sha256";
|
||||||
outputHashMode = "recursive";
|
outputHashMode = "recursive";
|
||||||
outputHash = "X5ppGUVwNQrMnjzD4Kin1Xmt4O3x+qr7jK4jr6E8tCI=";
|
outputHash = "1Cgw+5V2E/RENMRMm368+2yvY7y6v9gTlo+LRgrCXcE=";
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [ copyDesktopItems maven makeWrapper ];
|
nativeBuildInputs = [ copyDesktopItems maven makeWrapper ];
|
||||||
|
|
||||||
postPatch = ''
|
|
||||||
substituteInPlace pom.xml --subst-var-by buildDate "${buildDate}"
|
|
||||||
'';
|
|
||||||
|
|
||||||
buildPhase = ''
|
buildPhase = ''
|
||||||
mvn package --offline ${mvnOptions} -Dmaven.repo.local=${mavenDeps}
|
mvn package --offline ${mvnOptions} -Dmaven.repo.local=${mavenDeps}
|
||||||
'';
|
'';
|
||||||
|
|
|
@ -1,30 +0,0 @@
|
||||||
diff --git a/pom.xml b/pom.xml
|
|
||||||
index d5f8330b4..58ed18b63 100644
|
|
||||||
--- a/pom.xml
|
|
||||||
+++ b/pom.xml
|
|
||||||
@@ -129,7 +130,7 @@
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
|
||||||
<artifactId>maven-jar-plugin</artifactId>
|
|
||||||
- <version>2.5</version>
|
|
||||||
+ <version>3.2.0</version>
|
|
||||||
<configuration>
|
|
||||||
<archive>
|
|
||||||
<manifest>
|
|
||||||
@@ -188,6 +189,7 @@
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
|
||||||
<artifactId>maven-assembly-plugin</artifactId>
|
|
||||||
+ <version>3.2.0</version>
|
|
||||||
<configuration>
|
|
||||||
<finalName>Digital</finalName>
|
|
||||||
<appendAssemblyId>false</appendAssemblyId>
|
|
||||||
@@ -202,7 +204,7 @@
|
|
||||||
</manifest>
|
|
||||||
<manifestEntries>
|
|
||||||
<Build-SCM-Revision>${git.commit.id.describe}</Build-SCM-Revision>
|
|
||||||
- <Build-Time>${maven.build.timestamp}</Build-Time>
|
|
||||||
+ <Build-Time>@buildDate@</Build-Time>
|
|
||||||
<SplashScreen-Image>icons/splash.png</SplashScreen-Image>
|
|
||||||
</manifestEntries>
|
|
||||||
</archive>
|
|
Loading…
Reference in a new issue