Unverified Commit a603d123 authored by Aaron Andersen's avatar Aaron Andersen Committed by GitHub
Browse files

zzz: init at 0.2.0 (#460833)

parents 5f36aef8 26e83679
Loading
Loading
Loading
Loading
+38 −0
Original line number Diff line number Diff line
{
  asciidoctor,
  fetchFromGitHub,
  lib,
  stdenv,
}:
stdenv.mkDerivation rec {
  pname = "zzz";
  version = "0.2.0";

  src = fetchFromGitHub {
    owner = "jirutka";
    repo = "zzz";
    tag = "v${version}";
    hash = "sha256-gm/fzhgGM2kns051PKY223uesctvMj9LmLc4btUsTt8=";
  };

  postPatch = ''
    substituteInPlace zzz.c --replace-fail \
      'setenv("PATH", "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin", 1);' 'setenv("PATH", "/run/wrappers/bin:/run/current-system/sw/bin", 1);'
  '';

  nativeBuildInputs = [ asciidoctor ];

  makeFlags = [
    "prefix=$(out)"
    "sysconfdir=$(out)/etc"
  ];

  meta = {
    description = "Simple program to suspend or hibernate your computer";
    mainProgram = "zzz";
    homepage = "https://github.com/jirutka/zzz";
    license = lib.licenses.mit;
    maintainers = with lib.maintainers; [ aanderse ];
    platforms = lib.platforms.linux;
  };
}