From 8e19496335922de4488d2e3b835f1f253f843a0b Mon Sep 17 00:00:00 2001 From: Niko <97130632+Nyabinary@users.noreply.github.com> Date: Mon, 8 Jan 2024 10:11:54 -0500 Subject: cosmic-randr: init at unstable-2023-12-22 --- pkgs/by-name/co/cosmic-randr/package.nix | 49 ++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 pkgs/by-name/co/cosmic-randr/package.nix (limited to 'pkgs/by-name/co') diff --git a/pkgs/by-name/co/cosmic-randr/package.nix b/pkgs/by-name/co/cosmic-randr/package.nix new file mode 100644 index 000000000000..048a22f2a054 --- /dev/null +++ b/pkgs/by-name/co/cosmic-randr/package.nix @@ -0,0 +1,49 @@ +{ lib +, stdenv +, fetchFromGitHub +, rustPlatform +, just +, pkg-config +, wayland +}: + +rustPlatform.buildRustPackage rec { + pname = "cosmic-randr"; + version = "unstable-2023-12-22"; + + src = fetchFromGitHub { + owner = "pop-os"; + repo = pname; + rev = "8a082103a0365b02fbed2c17c02373eceb7ad4d3"; + hash = "sha256-LsZpey9OhNq9FTtHXvZXtHyhXttJ+tr5qBS6eSL27dE="; + }; + + cargoHash = "sha256-XpN9X8CZUGOe6mQhWWQy766gyoiTPObKsv9J8xiDvdA="; + + postPatch = '' + substituteInPlace justfile --replace '#!/usr/bin/env' "#!$(command -v env)" + ''; + + nativeBuildInputs = [ just pkg-config ]; + buildInputs = [ wayland ]; + + dontUseJustBuild = true; + + justFlags = [ + "--set" + "prefix" + (placeholder "out") + "--set" + "bin-src" + "target/${stdenv.hostPlatform.rust.cargoShortTarget}/release/cosmic-randr" + ]; + + meta = with lib; { + homepage = "https://github.com/pop-os/cosmic-randr"; + description = "Library and utility for displaying and configuring Wayland outputs"; + license = licenses.mpl20; + maintainers = with maintainers; [ nyanbinary ]; + platforms = platforms.linux; + mainProgram = "cosmic-randr"; + }; +} -- cgit 1.4.1