Skip to content

Commit

Permalink
remove superfluous use of pname
Browse files Browse the repository at this point in the history
  • Loading branch information
spitulax committed Dec 24, 2024
1 parent cf9e5d4 commit cc579cc
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
5 changes: 2 additions & 3 deletions pkgs/odin-git/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,15 @@ let
inherit (darwin.apple_sdk_11_0) MacOSX-SDK;
inherit (darwin.apple_sdk_11_0.frameworks) Security;

pname = "odin-git";
pkg = gitHubPkg {
owner = "odin-lang";
repo = "Odin";
ref = "master";
dirname = pname;
dirname = "odin-git";
};
in
stdenv.mkDerivation (pkg // {
inherit pname;
pname = "odin-git";

postPatch =
lib.optionalString stdenv.hostPlatform.isDarwin ''
Expand Down
2 changes: 1 addition & 1 deletion pkgs/odin-nightly/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ let
inherit (pkgData) url hash;
};

updateScript = writeShellScript dirname ''
updateScript = writeShellScript "mypkgs-update-${dirname}" ''
set -euo pipefail
${toShellVar "CURL" (getExe curl)}
Expand Down
17 changes: 9 additions & 8 deletions pkgs/osu-lazer/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,13 @@
, pipewireLatency ? "64/48000"
}:
let
pname = "osu-lazer";
command_prefix = "${gamemode}/bin/gamemoderun";

pkg = gitHubReleasePkg {
owner = "ppy";
repo = "osu";
assetName = "osu.AppImage";
dirname = pname;
dirname = "osu-lazer";
};
inherit (pkg) version;

Expand All @@ -40,8 +39,9 @@ let
pname = "osu.AppImage";
};

derivation = stdenvNoCC.mkDerivation rec {
inherit pname version;
derivation = stdenvNoCC.mkDerivation (finalAttrs: {
pname = "osu-lazer";
inherit version;
src = extracted;
buildInputs = [
SDL2
Expand Down Expand Up @@ -69,7 +69,7 @@ let
--set PIPEWIRE_LATENCY "${pipewireLatency}" \
--set OSU_EXTERNAL_UPDATE_PROVIDER "1" \
--set vblank_mode "0" \
--suffix LD_LIBRARY_PATH : "${lib.makeLibraryPath buildInputs}"
--suffix LD_LIBRARY_PATH : "${lib.makeLibraryPath finalAttrs.buildInputs}"
${
lib.optionalString (builtins.isString command_prefix) ''
sed -i '$s:exec :exec ${command_prefix} :' $out/bin/osu-lazer
Expand All @@ -82,10 +82,10 @@ let
ln -sft $out/lib/osu ${SDL2}/lib/libSDL2${stdenvNoCC.hostPlatform.extensions.sharedLibrary}
runHook postFixup
'';
};
});

desktopItem = makeDesktopItem {
name = pname;
name = "osu-lazer";
exec = "${derivation.outPath}/bin/osu-lazer %U";
icon = "${derivation.outPath}/osu.png";
comment = "A free-to-win rhythm game. Rhythm is just a *click* away!";
Expand Down Expand Up @@ -159,7 +159,8 @@ let
};
in
symlinkJoin {
inherit pname version;
pname = "osu-lazer";
inherit version;
paths = [
derivation
desktopItem
Expand Down

0 comments on commit cc579cc

Please sign in to comment.