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