nixpkgs/pkgs/by-name/wd/wdomirror/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

57 lines
1.3 KiB
Nix

{ lib
, stdenv
, fetchFromGitHub
, meson
, ninja
, pkg-config
, wayland
, wayland-protocols
, fetchpatch
, wayland-scanner
}:
stdenv.mkDerivation {
pname = "wdomirror";
version = "unstable-2021-01-08";
src = fetchFromGitHub {
owner = "progandy";
repo = "wdomirror";
rev = "e4a4934e6f739909fbf346cbc001c72690b5c906";
sha256 = "1fz0sajhdjqas3l6mpik8w1k15wbv65hgh9r9vdgfqvw5l6cx7jv";
};
patches = [
# https://github.com/progandy/wdomirror/pull/7
(fetchpatch {
url = "https://github.com/progandy/wdomirror/commit/142632208e9ea2b4a4ebd784532efdb8cad7b87c.patch";
hash = "sha256-MG71IEwRAjjacAkRoB7Tn45+FbY7LAqTDkVJkoWuQUU=";
})
];
strictDeps = true;
nativeBuildInputs = [ meson ninja pkg-config wayland-scanner ];
buildInputs = [ wayland wayland-protocols ];
installPhase = ''
runHook preInstall
install -m755 -D wdomirror $out/bin/wdomirror
runHook postInstall
'';
postPatch = ''
substituteInPlace meson.build \
--replace "werror=true" "werror=false"
'';
meta = with lib; {
description = "Mirrors an output of a wlroots compositor to a window";
homepage = "https://github.com/progandy/wdomirror";
license = licenses.mit;
platforms = platforms.linux;
maintainers = with maintainers; [ jpas ];
mainProgram = "wdomirror";
};
}