Skip to content

Commit 9f9c80f

Browse files
committed
starsector: move to by-name
1 parent 292fa7d commit 9f9c80f

File tree

2 files changed

+7
-8
lines changed

2 files changed

+7
-8
lines changed

pkgs/games/starsector/default.nix renamed to pkgs/by-name/st/starsector/package.nix

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,16 @@
44
libGL,
55
makeWrapper,
66
openal,
7-
openjdk,
7+
openjdk17,
88
stdenv,
99
xorg,
1010
copyDesktopItems,
1111
makeDesktopItem,
1212
writeScript,
1313
}:
14-
14+
let
15+
openjdk = openjdk17;
16+
in
1517
stdenv.mkDerivation rec {
1618
pname = "starsector";
1719
version = "0.98a-RC7";
@@ -25,6 +27,7 @@ stdenv.mkDerivation rec {
2527
copyDesktopItems
2628
makeWrapper
2729
];
30+
2831
buildInputs = [
2932
xorg.libXxf86vm
3033
openal
@@ -80,7 +83,7 @@ stdenv.mkDerivation rec {
8083
# pass-through CLI args ($@) to the JVM.
8184
postPatch = ''
8285
substituteInPlace starsector.sh \
83-
--replace-fail "./jre_linux/bin/java" "${openjdk}/bin/java" \
86+
--replace-fail "./jre_linux/bin/java" "${lib.getExe openjdk}" \
8487
--replace-fail "./native/linux" "$out/share/starsector/native/linux" \
8588
--replace-fail "./compiler_directives.txt" "$out/share/starsector/compiler_directives.txt" \
8689
--replace-fail "=." "=\''${XDG_DATA_HOME:-\$HOME/.local/share}/starsector" \
@@ -92,7 +95,7 @@ stdenv.mkDerivation rec {
9295
#!nix-shell -i bash -p curl gnugrep common-updater-scripts
9396
set -eou pipefail;
9497
version=$(curl -s https://fractalsoftworks.com/preorder/ | grep -oP "https://f005.backblazeb2.com/file/fractalsoftworks/release/starsector_linux-\K.*?(?=\.zip)" | head -1)
95-
update-source-version ${pname} "$version" --file=./pkgs/games/starsector/default.nix
98+
update-source-version ${pname} "$version" --file=./pkgs/by-name/st/starsector/package.nix
9699
'';
97100

98101
meta = with lib; {

pkgs/top-level/all-packages.nix

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15232,10 +15232,6 @@ with pkgs;
1523215232
buildShareware = true;
1523315233
};
1523415234

15235-
starsector = callPackage ../games/starsector {
15236-
openjdk = openjdk17;
15237-
};
15238-
1523915235
scummvm = callPackage ../games/scummvm { };
1524015236

1524115237
inherit (callPackage ../games/scummvm/games.nix { })

0 commit comments

Comments
 (0)