diff options
Diffstat (limited to 'pkgs/development/libraries/libliftoff/default.nix')
-rw-r--r-- | pkgs/development/libraries/libliftoff/default.nix | 52 |
1 files changed, 18 insertions, 34 deletions
diff --git a/pkgs/development/libraries/libliftoff/default.nix b/pkgs/development/libraries/libliftoff/default.nix index 4bcf6ae166a05..8d695b2b9afd8 100644 --- a/pkgs/development/libraries/libliftoff/default.nix +++ b/pkgs/development/libraries/libliftoff/default.nix @@ -1,35 +1,19 @@ -{ lib, stdenv, fetchFromGitLab -, meson, pkg-config, ninja -, libdrm -}: - -stdenv.mkDerivation rec { - pname = "libliftoff"; - version = "0.4.1"; - - src = fetchFromGitLab { - domain = "gitlab.freedesktop.org"; - owner = "emersion"; - repo = pname; - rev = "v${version}"; - sha256 = "sha256-NPwhsd6IOQ0XxNQQNdaaM4kmwoLftokV86WYhoa5csY="; - }; - - nativeBuildInputs = [ meson pkg-config ninja ]; - - buildInputs = [ libdrm ]; - - meta = with lib; { - description = "Lightweight KMS plane library"; - longDescription = '' - libliftoff eases the use of KMS planes from userspace without standing in - your way. Users create "virtual planes" called layers, set KMS properties - on them, and libliftoff will pick planes for these layers if possible. - ''; - inherit (src.meta) homepage; - changelog = "https://github.com/emersion/libliftoff/releases/tag/v${version}"; - license = licenses.mit; - platforms = platforms.linux; - maintainers = with maintainers; [ primeos Scrumplex ]; - }; +{ callPackage, fetchFromGitLab, ... }: +let + mkVariant = + version: hash: + callPackage ./generic.nix { + inherit version; + src = fetchFromGitLab { + domain = "gitlab.freedesktop.org"; + owner = "emersion"; + repo = "libliftoff"; + rev = "v${version}"; + inherit hash; + }; + }; +in +{ + libliftoff_0_4 = mkVariant "0.4.1" "sha256-NPwhsd6IOQ0XxNQQNdaaM4kmwoLftokV86WYhoa5csY="; + libliftoff_0_5 = mkVariant "0.5.0" "sha256-PcQY8OXPqfn8C30+GAYh0Z916ba5pik8U0fVpZtFb5g="; } |