Unverified Commit 0ccffdeb authored by Gergő Gutyina's avatar Gergő Gutyina Committed by GitHub
Browse files

various: refactor meta section, hardcode pname, switch to finalAttrs (#442924)

parents f1302808 8e66dc69
Loading
Loading
Loading
Loading
+5 −7
Original line number Diff line number Diff line
@@ -4,25 +4,23 @@
  fetchurl,
}:

stdenvNoCC.mkDerivation rec {
stdenvNoCC.mkDerivation (finalAttrs: {
  pname = "stops";
  version = "0.4.0";

  src = fetchurl {
    url = "https://kokkinizita.linuxaudio.org/linuxaudio/downloads/stops-${version}.tar.bz2";
    url = "https://kokkinizita.linuxaudio.org/linuxaudio/downloads/stops-${finalAttrs.version}.tar.bz2";
    hash = "sha256-DnmguOAGyw9nv88ekJfbC04Qwbsw5tXEAaKeiCQR/LA=";
  };

  outputHashMode = "recursive";
  outputHash = "sha256-gGHowq7g7MZmnhrpqG+3wNLwQCtpiBB88euIKeQIpJ0=";

  subdir = "share/Aeolus/stops";

  installPhase = ''
    runHook preInstall

    mkdir -p $out/${subdir}
    cp -r * $out/${subdir}
    mkdir -p $out/share/Aeolus/stops
    cp -r * $out/share/Aeolus/stops

    runHook postInstall
  '';
@@ -36,4 +34,4 @@ stdenvNoCC.mkDerivation rec {
      nico202
    ];
  };
}
})
+1 −1
Original line number Diff line number Diff line
@@ -50,7 +50,7 @@ stdenv.mkDerivation (finalAttrs: {
      cfg = ''
        # Aeolus system wide default options
        # Ignored if ~/.aeolusrc with local options exists
        -u -S ${aeolus-stops}/${aeolus-stops.subdir}
        -u -S ${aeolus-stops}/share/Aeolus/stops
      '';
    in
    ''
+1 −1
Original line number Diff line number Diff line
@@ -47,7 +47,7 @@ beamPackages.mixRelease rec {
  ];

  mixFodDeps = beamPackages.fetchMixDeps {
    pname = "mix-deps-${pname}";
    pname = "mix-deps-akkoma";
    inherit src version;
    hash = "sha256-DqSeMjom9UjgGjjfJomWCr7jQhXEkqVrDCvW3+pDtcQ=";

+7 −7
Original line number Diff line number Diff line
@@ -29,12 +29,12 @@
  libx11,
}:

stdenv.mkDerivation rec {
stdenv.mkDerivation (finalAttrs: {
  pname = "alfaview";
  version = "9.24.1";

  src = fetchurl {
    url = "https://assets.alfaview.com/stable/linux/deb/${pname}_${version}.deb";
    url = "https://assets.alfaview.com/stable/linux/deb/alfaview_${finalAttrs.version}.deb";
    hash = "sha256-vRo5ZD3yYTWhR6fbc/HFtBBbYuq3cGbxPuDlSt5D8XM=";
  };

@@ -72,7 +72,7 @@ stdenv.mkDerivation rec {
    libxcb-render-util
  ];

  libPath = lib.makeLibraryPath buildInputs;
  libPath = lib.makeLibraryPath finalAttrs.buildInputs;

  dontBuild = true;
  dontConfigure = true;
@@ -84,11 +84,11 @@ stdenv.mkDerivation rec {
    mv opt $out

    substituteInPlace $out/share/applications/alfaview.desktop \
      --replace "/opt/alfaview" "$out/bin" \
      --replace "/usr/share/pixmaps/alfaview_production.png" alfaview_production
      --replace-fail "/opt/alfaview" "$out/bin" \
      --replace-fail "/usr/share/pixmaps/alfaview.png" alfaview

    makeWrapper $out/opt/alfaview/alfaview $out/bin/alfaview \
      --prefix LD_LIBRARY_PATH : ${libPath}
      --prefix LD_LIBRARY_PATH : ${finalAttrs.libPath}

    runHook postInstall
  '';
@@ -102,4 +102,4 @@ stdenv.mkDerivation rec {
    mainProgram = "alfaview";
    platforms = [ "x86_64-linux" ];
  };
}
})
+4 −4
Original line number Diff line number Diff line
@@ -22,12 +22,12 @@ appimageTools.wrapType2 {
  nativeBuildInputs = [ makeWrapper ];

  extraInstallCommands = ''
    wrapProgram $out/bin/${pname} \
    wrapProgram $out/bin/altair \
        --add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--ozone-platform-hint=auto --enable-features=WaylandWindowDecorations --enable-wayland-ime=true}}"

    install -m 444 -D ${appimageContents}/${pname}.desktop -t $out/share/applications
    substituteInPlace $out/share/applications/${pname}.desktop \
      --replace 'Exec=AppRun' 'Exec=${pname}'
    install -m 444 -D ${appimageContents}/altair.desktop -t $out/share/applications
    substituteInPlace $out/share/applications/altair.desktop \
      --replace-fail 'Exec=AppRun' 'Exec=altair'
    cp -r ${appimageContents}/usr/share/icons $out/share
  '';

Loading