Files
nixpkgs/pkgs/by-name/od/odin2/package.nix
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

117 lines
2.3 KiB
Nix
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
{
stdenv,
lib,
fetchFromGitHub,
cmake,
pkg-config,
alsa-lib,
freetype,
libjack2,
lv2,
libX11,
libXcursor,
libXext,
libXinerama,
libXrandr,
libGL,
gcc-unwrapped,
copyDesktopItems,
makeDesktopItem,
nix-update-script,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "odin2";
version = "2.4.1";
src = fetchFromGitHub {
owner = "TheWaveWarden";
repo = "odin2";
tag = "v${finalAttrs.version}";
fetchSubmodules = true;
hash = "sha256-j/rZvBNBTDo2vwESXbGIXR89PHOI1HK8hvzV7y6dJHI=";
};
nativeBuildInputs = [
cmake
pkg-config
copyDesktopItems
];
buildInputs = [
alsa-lib
freetype
libjack2
lv2
libX11
libXcursor
libXext
libXinerama
libXrandr
libGL
];
# JUCE dlopen's these at runtime, crashes without them
NIX_LDFLAGS = (
toString [
"-lX11"
"-lXext"
"-lXcursor"
"-lXinerama"
"-lXrandr"
]
);
# JUCE wants to write to $HOME/.{lv2,vst3}
preConfigure = ''
export HOME="$TMPDIR"
'';
cmakeFlags = [
"-DCMAKE_AR=${gcc-unwrapped}/bin/gcc-ar"
"-DCMAKE_RANLIB=${gcc-unwrapped}/bin/gcc-ranlib"
"-DCMAKE_NM=${gcc-unwrapped}/bin/gcc-nm"
];
installPhase = ''
mkdir -p $out/bin $out/lib/vst3 $out/lib/lv2 $out/lib/clap $out/share/icons/hicolor/512x512/apps
cd Odin2_artefacts/Release
cp Standalone/Odin2 $out/bin
cp -r VST3/Odin2.vst3 $out/lib/vst3
cp -r LV2/Odin2.lv2 $out/lib/lv2
cp -r CLAP/Odin2.clap $out/lib/clap
# Theres no application icon, so the vendors logo will have to do.
cp $src/manual/graphics/logo.png $out/share/icons/hicolor/512x512/apps/odin2.png
copyDesktopItems
'';
desktopItems = [
(makeDesktopItem {
name = "Odin2";
desktopName = "Odin 2";
comment = "Odin 2 Free Synthesizer";
icon = "odin2";
startupNotify = true;
categories = [
"AudioVideo"
"Audio"
"Midi"
"Music"
];
dbusActivatable = false;
exec = "Odin2";
})
];
passthru.updateScript = nix-update-script { };
meta = with lib; {
description = "Odin 2 Synthesizer Plugin";
homepage = "https://thewavewarden.com/odin2";
license = licenses.gpl3;
platforms = [ "x86_64-linux" ];
maintainers = with maintainers; [ magnetophon ];
mainProgram = "Odin2";
};
})