Winter a19cd4ffb1 Revert "treewide: replace rev with tag"
This reverts commit 65a333600d5c88a98d674f637d092807cfc12253.

This wasn't tested for correctness with something like fodwatch [0],
and should not have been (self-)merged so quickly, especially without
further review.

It also resulted in the breakage of at least one package [1] (and that's
the one we know of and was caught).

A few packages that were updated in between this commit and this revert
were not reverted back to using `rev`, but other than that, this is a
1:1 revert.

[0]: https://codeberg.org/raphaelr/fodwatch
[1]: https://github.com/NixOS/nixpkgs/pull/396904 / 758551e4587d75882aebc21a04bee960418f8ce9
2025-04-08 02:57:25 -04:00

107 lines
2.3 KiB
Nix

{
lib,
stdenv,
fetchFromGitHub,
fetchpatch,
cmake,
pkg-config,
libjack2,
alsa-lib,
freetype,
libX11,
libXrandr,
libXinerama,
libXext,
libXcursor,
}:
let
# Derived from subprojects/function2.wrap
function2 = rec {
version = "4.1.0";
src = fetchFromGitHub {
owner = "Naios";
repo = "function2";
rev = version;
hash = "sha256-JceZU8ZvtYhFheh8BjMvjjZty4hcYxHEK+IIo5X4eSk=";
};
};
juce = {
version = "unstable-2021-04-07";
src = fetchFromGitHub {
owner = "juce-framework";
repo = "JUCE";
rev = "1a5fb5992a1a4e28e998708ed8dce2cc864a30d7";
sha256 = "1ri7w4sz3sy5xilibg53ls9526fx7jwbv8rc54ccrqfhxqyin308";
};
};
in
stdenv.mkDerivation {
pname = "diopser";
version = "unstable-2021-5-13";
src = fetchFromGitHub {
owner = "robbert-vdh";
repo = "diopser";
fetchSubmodules = true;
rev = "d5fdc92f1caf5a828e071dac99e106e58f06d84d";
sha256 = "06y1h895yxh44gp4vxzrna59lf7nlfw7aacd3kk4l1g56jhy9pdx";
};
patches = [
(fetchpatch {
name = "fix-gcc-11-build.patch";
url = "https://github.com/robbert-vdh/diopser/commit/a7284439bd4e23455132e7806a214f9db12efae9.patch";
hash = "sha256-r3yxhnhPUQ47srhfAKeurpe2xyEBdSvqIbgqs9/6gD4=";
})
];
postUnpack = ''
(
cd "$sourceRoot"
cp -R --no-preserve=mode,ownership ${function2.src} function2
cp -R --no-preserve=mode,ownership ${juce.src} JUCE
sed -i 's@CPMAddPackage("gh:juce-framework/JUCE.*@add_subdirectory(JUCE)@g' CMakeLists.txt
sed -i 's@CPMAddPackage("gh:Naios/function2.*@add_subdirectory(function2)@g' CMakeLists.txt
patchShebangs .
)
'';
installPhase = ''
mkdir -p $out/lib/vst3
cp -r Diopser_artefacts/Release/VST3/Diopser.vst3 $out/lib/vst3
'';
nativeBuildInputs = [
cmake
pkg-config
];
buildInputs = [
libjack2
alsa-lib
freetype
libX11
libXrandr
libXinerama
libXext
libXcursor
];
cmakeFlags = [
"-DCMAKE_AR=${stdenv.cc.cc}/bin/gcc-ar"
"-DCMAKE_RANLIB=${stdenv.cc.cc}/bin/gcc-ranlib"
];
meta = with lib; {
description = "Totally original phase rotation plugin";
homepage = "https://github.com/robbert-vdh/diopser";
license = licenses.gpl3Plus;
maintainers = with maintainers; [ magnetophon ];
platforms = platforms.all;
};
}