Skip to content

Commit 681f4fa

Browse files
committed
z88dk: run nixfmt and apply finalAttrs pattern.
No other change.
1 parent 6df58cc commit 681f4fa

File tree

1 file changed

+35
-10
lines changed

1 file changed

+35
-10
lines changed

pkgs/development/compilers/z88dk/default.nix

Lines changed: 35 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,25 @@
1-
{ fetchFromGitHub, lib, stdenv, makeWrapper, unzip, libxml2, gmp, m4, uthash, which, pkg-config }:
1+
{
2+
fetchFromGitHub,
3+
lib,
4+
stdenv,
5+
makeWrapper,
6+
unzip,
7+
libxml2,
8+
gmp,
9+
m4,
10+
uthash,
11+
which,
12+
pkg-config,
13+
}:
214

3-
stdenv.mkDerivation rec {
15+
stdenv.mkDerivation (finalAttrs: {
416
pname = "z88dk";
517
version = "2.3";
618

719
src = fetchFromGitHub {
820
owner = "z88dk";
921
repo = "z88dk";
10-
rev = "v${version}";
22+
rev = "v${finalAttrs.version}";
1123
hash = "sha256-CHTORgK6FYIO6n+cvTUX4huY2Ek5FuHrs40QN5NZX44=";
1224
fetchSubmodules = true;
1325
};
@@ -32,22 +44,35 @@ stdenv.mkDerivation rec {
3244
#_FORTIFY_SOURCE requires compiling with optimization (-O)
3345
env.NIX_CFLAGS_COMPILE = "-O";
3446

35-
short_rev = builtins.substring 0 7 src.rev;
47+
short_rev = builtins.substring 0 7 finalAttrs.src.rev;
3648
makeFlags = [
37-
"git_rev=${short_rev}"
38-
"version=${version}"
49+
"git_rev=${finalAttrs.short_rev}"
50+
"version=${finalAttrs.version}"
3951
"DESTDIR=$(out)"
4052
"git_count=0"
4153
];
4254

43-
nativeBuildInputs = [ which makeWrapper unzip pkg-config ];
44-
buildInputs = [ libxml2 m4 uthash gmp ];
55+
nativeBuildInputs = [
56+
which
57+
makeWrapper
58+
unzip
59+
pkg-config
60+
];
61+
buildInputs = [
62+
libxml2
63+
m4
64+
uthash
65+
gmp
66+
];
4567

4668
preInstall = ''
4769
mkdir -p $out/{bin,share}
4870
'';
4971

50-
installTargets = [ "libs" "install" ];
72+
installTargets = [
73+
"libs"
74+
"install"
75+
];
5176

5277
meta = with lib; {
5378
homepage = "https://www.z88dk.org";
@@ -56,4 +81,4 @@ stdenv.mkDerivation rec {
5681
maintainers = [ maintainers.siraben ];
5782
platforms = platforms.unix;
5883
};
59-
}
84+
})

0 commit comments

Comments
 (0)