Merge pull request #245847 from NixOS/github-desktop/finalAttrs-pattern-and-bump-to-3.2.5

github-desktop: Use `finalAttrs` pattern, remove old openssl and bump to 3.2.5
This commit is contained in:
Pol Dellaiera 2023-08-06 19:21:24 +02:00 committed by GitHub
commit 0145d8112d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 18 additions and 21 deletions

View file

@ -19,13 +19,13 @@
, openssl
}:
stdenv.mkDerivation rec {
stdenv.mkDerivation (finalAttrs: {
pname = "github-desktop";
version = "3.2.1";
version = "3.2.5";
src = fetchurl {
url = "https://github.com/shiftkey/desktop/releases/download/release-${version}-linux1/GitHubDesktop-linux-${version}-linux1.deb";
hash = "sha256-OdvebRvOTyadgNjzrv6CGDPkljfpo4RVvVAc+X9hjSo=";
url = "https://github.com/shiftkey/desktop/releases/download/release-${finalAttrs.version}-linux1/GitHubDesktop-linux-${finalAttrs.version}-linux1.deb";
hash = "sha256-p+qr9/aEQcfkKArC3oTyIijHkaNzLum3xXeSnNexgbU=";
};
nativeBuildInputs = [
@ -50,16 +50,16 @@ stdenv.mkDerivation rec {
];
unpackPhase = ''
mkdir -p $TMP/${pname} $out/{opt,bin}
cp $src $TMP/${pname}.deb
ar vx ${pname}.deb
tar --no-overwrite-dir -xvf data.tar.xz -C $TMP/${pname}/
mkdir -p $TMP/${finalAttrs.pname} $out/{opt,bin}
cp $src $TMP/${finalAttrs.pname}.deb
ar vx ${finalAttrs.pname}.deb
tar --no-overwrite-dir -xvf data.tar.xz -C $TMP/${finalAttrs.pname}/
'';
installPhase = ''
cp -R $TMP/${pname}/usr/share $out/
cp -R $TMP/${pname}/usr/lib/${pname}/* $out/opt/
ln -sf $out/opt/${pname} $out/bin/${pname}
cp -R $TMP/${finalAttrs.pname}/usr/share $out/
cp -R $TMP/${finalAttrs.pname}/usr/lib/${finalAttrs.pname}/* $out/opt/
ln -sf $out/opt/${finalAttrs.pname} $out/bin/${finalAttrs.pname}
'';
preFixup = ''
@ -72,12 +72,12 @@ stdenv.mkDerivation rec {
(lib.getLib systemd)
];
meta = with lib; {
meta = {
description = "GUI for managing Git and GitHub.";
homepage = "https://desktop.github.com/";
sourceProvenance = with sourceTypes; [ binaryNativeCode ];
license = licenses.mit;
maintainers = with maintainers; [ dan4ik605743 ];
platforms = platforms.linux;
sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ dan4ik605743 ];
platforms = lib.platforms.linux;
};
}
})

View file

@ -3710,10 +3710,7 @@ with pkgs;
github-copilot-intellij-agent = callPackage ../development/tools/github-copilot-intellij-agent { };
github-desktop = callPackage ../applications/version-management/github-desktop {
openssl = openssl_1_1;
curl = curl.override { openssl = openssl_1_1; };
};
github-desktop = callPackage ../applications/version-management/github-desktop { };
github-to-sqlite = with python3Packages; toPythonApplication github-to-sqlite;