Commit 55024503 authored by Julian Hoch's avatar Julian Hoch
Browse files

xscreenruler: init at 1.0.2

parent 18c700b2
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -12840,17 +12840,17 @@
    github = "juliamertz";
    githubId = 35079666;
  };
  julian-hoch = {
    name = "Julian Hoch";
    github = "julian-hoch";
    githubId = 95583314;
  };
  JulianFP = {
    name = "Julian Partanen";
    github = "JulianFP";
    githubId = 70963316;
    keys = [ { fingerprint = "C61D 7747 43DE EF05 4E4A  3AC1 6FE2 79EB 5C9F 3466"; } ];
  };
  julian-hoch = {
    name = "Julian Hoch";
    github = "julian-hoch";
    githubId = 95583314;
  };
  juliendehos = {
    email = "dehos@lisic.univ-littoral.fr";
    github = "juliendehos";
+43 −0
Original line number Diff line number Diff line
{
  lib,
  stdenv,
  fetchFromGitHub,
  xorg,
  makeWrapper,
}:

stdenv.mkDerivation (finalAttrs: {
  pname = "xscreenruler";
  version = "1.0.2";

  src = fetchFromGitHub {
    owner = "julian-hoch";
    repo = "xscreenruler";
    tag = "v${finalAttrs.version}";
    hash = "sha256-oRbZ8r9EOPcLuuX8VyCBNt6ljdnko/EV8C8aeR85xYU=";
  };

  buildInputs = [ xorg.libX11 ];
  nativeBuildInputs = [ makeWrapper ];

  makeFlags = [ "CC=${stdenv.cc.targetPrefix}cc" ];

  installPhase = ''
    runHook preInstall
    install -Dm755 xscreenruler -t $out/bin
    runHook postInstall
  '';

  postFixup = ''
    wrapProgram $out/bin/xscreenruler \
      --prefix PATH : ${lib.makeBinPath [ xorg.xsetroot ]}
  '';

  meta = {
    description = "Simple screen ruler using xlib";
    homepage = "https://github.com/julian-hoch/xscreenruler";
    license = lib.licenses.mit;
    platforms = lib.platforms.linux;
    maintainers = [ lib.maintainers.julian-hoch ];
  };
})