nixpkgs/pkgs/by-name/as/ashpd-demo/package.nix
aleksana 571c71e6f7 treewide: migrate packages to pkgs/by-name, take 1
We are migrating packages that meet below requirements:

1. using `callPackage`
2. called path is a directory
3. overriding set is empty (`{ }`)
4. not containing path expressions other than relative path (to
makenixpkgs-vet happy)
5. not referenced by nix files outside of the directory, other
than`pkgs/top-level/all-packages.nix`
6. not referencing nix files outside of the directory
7. not referencing `default.nix` (since it's changed to `package.nix`)
8. `outPath` doesn't change after migration

The tool is here: https://github.com/Aleksanaa/by-name-migrate.
2024-11-09 20:04:51 +08:00

74 lines
1.3 KiB
Nix

{ stdenv
, lib
, fetchFromGitHub
, cargo
, meson
, ninja
, rustPlatform
, rustc
, pkg-config
, glib
, libshumate
, gst_all_1
, gtk4
, libadwaita
, pipewire
, wayland
, wrapGAppsHook4
, desktop-file-utils
}:
stdenv.mkDerivation (finalAttrs: {
pname = "ashpd-demo";
version = "0.4.1";
src = fetchFromGitHub {
owner = "bilelmoussaoui";
repo = "ashpd";
rev = "${finalAttrs.version}-demo";
hash = "sha256-fIyJEUcyTcjTbBycjuJb99wALQelMT7Zq6PHKcL2F80=";
};
cargoDeps = rustPlatform.fetchCargoTarball {
src = "${finalAttrs.src}/ashpd-demo";
hash = "sha256-ldflCBErM9w3eO2DwWfYTrdO7lowZtqfj7Fft6Crl1w=";
};
nativeBuildInputs = [
meson
ninja
pkg-config
cargo
rustPlatform.cargoSetupHook
rustc
wrapGAppsHook4
rustPlatform.bindgenHook
desktop-file-utils
glib # for glib-compile-schemas
];
buildInputs = [
glib
gtk4
gst_all_1.gstreamer
gst_all_1.gst-plugins-base
libadwaita
pipewire
wayland
libshumate
];
postPatch = ''
cd ashpd-demo
'';
meta = with lib; {
description = "Tool for playing with XDG desktop portals";
mainProgram = "ashpd-demo";
homepage = "https://github.com/bilelmoussaoui/ashpd/tree/master/ashpd-demo";
license = licenses.mit;
maintainers = with maintainers; [ jtojnar ];
platforms = platforms.linux;
};
})