Unverified Commit 29df271e authored by Yohann Boniface's avatar Yohann Boniface Committed by GitHub
Browse files

xscreenruler: init at 1.0.2 (#435874)

parents c4025707 55024503
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -12847,6 +12847,11 @@
    github = "juliamertz";
    githubId = 35079666;
  };
  julian-hoch = {
    name = "Julian Hoch";
    github = "julian-hoch";
    githubId = 95583314;
  };
  JulianFP = {
    name = "Julian Partanen";
    github = "JulianFP";
+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 ];
  };
})