Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmake --install: not working correctly when "CMAKE_INSTALL_LIBDIR" is absolute [NIXPKGS] #50

Open
TheRedstoneDEV-DE opened this issue Aug 6, 2024 · 0 comments

Comments

@TheRedstoneDEV-DE
Copy link

TheRedstoneDEV-DE commented Aug 6, 2024

Hello,
I am trying to maintain the drumkv1 nix-package after the previous maintainer has gone and I am facing the following problem:
Everytime I try to build the package, it installs the plugin (so only the library) to "/etc/nix-store/xxxxxxxxx-drumkv1-1.0.0/etc/nix-store/xxxxxxxxx-drumkv1-1.0.0/lib/lv2/.../...", because CMAKE_INSTALL_LIBDIR is set to a absolute path (but all others like CMAKE_INSTALL_BINDIR are set to a relative path... what?), as well as CMAKE_INSTALL_PREFIX (I've figured that out so far; /CMakeLists.txt:51).
When I just set -DCMAKE_INSTALL_LIBDIR=lib it installs completely normal and correctly. I still suspect it is a problem on their side, but they told me: "No both CMAKE_INSTALL_PREFIX and CMAKE_INSTALL_LIBDIR can be absolute paths so it's not an issue at our side! This is an upstream issue.".

My default.nix looks like this at the time (If it matters... I know qt6-full isn't optimal)

  {
    stdenv, lib, pkg-config
  ,  fetchurl
  ,  cmake
  ,  libjack2
  ,  alsa-lib
  ,  libsndfile
  ,  liblo
  ,  lv2
  ,  qt6
  ,  xorg
  }:
  
  stdenv.mkDerivation rec {
    pname = "drumkv1";
    version = "1.0.0";
  
    src = fetchurl {
      url = "mirror://sourceforge/drumkv1/drumkv1-${version}.tar.gz";
      sha256 = "sha256-vi//84boqaVxC/KCg+HF76vB4Opch02LU4RtbVaxaX4=";
    };
  
    buildInputs = [
      libjack2
      alsa-lib
      libsndfile
      liblo
      lv2
      qt6.full
      xorg.libX11
      qt6.qtbase
      qt6.qtwayland
    ];
  
    nativeBuildInputs = [ pkg-config cmake qt6.wrapQtAppsHook ];
  
    cmakeFlags = [
      # disable experimental feature "LV2 port change request"
      "-DCONFIG_LV2_PORT_CHANGE_REQUEST=false"
      # set correct libdir
      "-DCMAKE_INSTALL_LIBDIR=lib"
    ];
  
    meta = with lib; {
      description = "Old-school drum-kit sampler synthesizer with stereo fx";
      mainProgram = "drumkv1_jack";
      homepage = "http://drumkv1.sourceforge.net/";
      license = licenses.gpl2Plus;
      platforms = platforms.linux;
      maintainers = [  ];
    };
  }

Anyways, I don't want to bother you, I know that you are developing this project out of your spare time and I respect your work.
The backstory is, that I depend on drumkv1 working, which it currently isn't because the LV2-Side of the build on nixpkgs is broken (that's definitely not a problem at your side)... I can build it from source and use it, but i figured I could just fix it for everyone... I thought it would be easy, but it clearly isn't that easy...

Thanks in advance!

@TheRedstoneDEV-DE TheRedstoneDEV-DE changed the title cmake --install: not installing into the correct directory [NIXPKGS] cmake --install: not working correctly when "CMAKE_INSTALL_LIBDIR" is absolute [NIXPKGS] Aug 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant