Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)

xdg-desktop-portal-shana: switch from buildrustpackage to mkderivation (#393432)

authored by h7x4 and committed by GitHub 37697c4d 3ecf126c

+21 -16
+21 -16
pkgs/by-name/xd/xdg-desktop-portal-shana/package.nix
··· 1 { 2 lib, 3 rustPlatform, 4 fetchFromGitHub, 5 meson, 6 ninja, 7 xdg-desktop-portal, 8 }: 9 10 - rustPlatform.buildRustPackage rec { 11 pname = "xdg-desktop-portal-shana"; 12 version = "0.3.14"; 13 14 src = fetchFromGitHub { 15 owner = "Decodetalkers"; 16 repo = "xdg-desktop-portal-shana"; 17 - rev = "v${version}"; 18 hash = "sha256-9uie6VFyi7sO8DbthUTgpEc68MvvLA+bUwyV/DSpKkE="; 19 }; 20 21 nativeBuildInputs = [ 22 meson 23 ninja 24 ]; 25 ··· 27 xdg-desktop-portal 28 ]; 29 30 - # Needed for letting meson run. rustPackage will overwrite it otherwise. 31 - configurePhase = ""; 32 - 33 - mesonBuildType = "release"; 34 - 35 - useFetchCargoVendor = true; 36 - cargoHash = "sha256-f9kfCoH0YHVzzZC4rChJgz0yQqVVAYR7Gpa6HuXhQZY="; 37 - 38 - meta = with lib; { 39 description = "Filechooser portal backend for any desktop environment"; 40 homepage = "https://github.com/Decodetalkers/xdg-desktop-portal-shana"; 41 - license = licenses.mit; 42 - platforms = platforms.linux; 43 - maintainers = [ maintainers.samuelefacenda ]; 44 }; 45 - 46 - }
··· 1 { 2 lib, 3 + stdenv, 4 rustPlatform, 5 fetchFromGitHub, 6 meson, 7 + rustc, 8 + cargo, 9 ninja, 10 xdg-desktop-portal, 11 }: 12 13 + stdenv.mkDerivation (finalAttrs: { 14 pname = "xdg-desktop-portal-shana"; 15 version = "0.3.14"; 16 17 src = fetchFromGitHub { 18 owner = "Decodetalkers"; 19 repo = "xdg-desktop-portal-shana"; 20 + rev = "v${finalAttrs.version}"; 21 hash = "sha256-9uie6VFyi7sO8DbthUTgpEc68MvvLA+bUwyV/DSpKkE="; 22 }; 23 24 + cargoDeps = rustPlatform.fetchCargoVendor { 25 + inherit (finalAttrs) pname version src; 26 + hash = "sha256-f9kfCoH0YHVzzZC4rChJgz0yQqVVAYR7Gpa6HuXhQZY="; 27 + }; 28 + 29 nativeBuildInputs = [ 30 meson 31 + rustc 32 + rustPlatform.cargoSetupHook 33 + cargo 34 ninja 35 ]; 36 ··· 38 xdg-desktop-portal 39 ]; 40 41 + meta = { 42 description = "Filechooser portal backend for any desktop environment"; 43 homepage = "https://github.com/Decodetalkers/xdg-desktop-portal-shana"; 44 + license = lib.licenses.mit; 45 + platforms = lib.platforms.linux; 46 + maintainers = with lib.maintainers; [ 47 + samuelefacenda 48 + Rishik-Y 49 + ]; 50 }; 51 + })