Skip to content

Commit

Permalink
Merge pull request #318453 from Sigmanificient/sxcs-init-1.1.0
Browse files Browse the repository at this point in the history
sxcs: init at 1.1.0
  • Loading branch information
Aleksanaa committed Jun 21, 2024
2 parents bb0184d + 305f2d8 commit 0f3e897
Showing 1 changed file with 48 additions and 0 deletions.
48 changes: 48 additions & 0 deletions pkgs/by-name/sx/sxcs/package.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
{
lib,
stdenv,
fetchFromGitea,
xorg,
installShellFiles
}:

stdenv.mkDerivation (finalAttrs: {
name = "sxcs";
version = "1.1.0";

src = fetchFromGitea {
domain = "codeberg.org";
owner = "NRK";
repo = "sxcs";
rev = "refs/tags/v${finalAttrs.version}";
hash = "sha256-rYmbbdZjeLCvGvNocI3+KVU2KBkYvRisayTyScTRay8=";
};

buildInputs = [ xorg.libX11 xorg.libXcursor ];
nativeBuildInputs = [ installShellFiles ];

buildPhase = ''
runHook preBuild
${stdenv.cc.targetPrefix}cc -o sxcs sxcs.c -O3 -s -l X11 -l Xcursor
runHook postBuild
'';

outputs = [ "out" "man" ];

installPhase = ''
runHook preInstall
install -Dm755 sxcs -t $out/bin
installManPage sxcs.1
runHook postInstall
'';

meta = {
description = "Minimal X11 Color Picker and Magnifier";
homepage = "https://codeberg.org/NRK/sxcs";
license = lib.licenses.gpl3Plus;
maintainers = with lib.maintainers; [ sigmanificient ];
platforms = lib.platforms.linux;
};
})

0 comments on commit 0f3e897

Please sign in to comment.