Commit 3d98b57f authored by Bang Lee's avatar Bang Lee
Browse files

slock: move config logic inside and allow more options

parent 38f5dc9f
Loading
Loading
Loading
Loading
+8 −4
Original line number Diff line number Diff line
@@ -8,9 +8,10 @@
  libXext,
  libXrandr,
  libxcrypt,
  # default header can be obtained from
  # https://git.suckless.org/slock/tree/config.def.h
  conf ? null,
  config,
  conf ? config.slock.conf or null,
  patches ? config.slock.patches or [ ],
  extraLibs ? config.slock.extraLibs or [ ],
  # update script dependencies
  gitUpdater,
}:
@@ -30,7 +31,8 @@ stdenv.mkDerivation (finalAttrs: {
    libXext
    libXrandr
    libxcrypt
  ];
  ]
  ++ extraLibs;

  installFlags = [ "PREFIX=$(out)" ];

@@ -40,6 +42,8 @@ stdenv.mkDerivation (finalAttrs: {
    cp ${writeText "config.def.h" conf} config.def.h
  '';

  inherit patches;

  makeFlags = [ "CC:=$(CC)" ];

  passthru.updateScript = gitUpdater {
+1 −3
Original line number Diff line number Diff line
@@ -15900,9 +15900,7 @@ with pkgs;

  sane-frontends = callPackage ../applications/graphics/sane/frontends.nix { };

  slock = callPackage ../misc/screensavers/slock {
    conf = config.slock.conf or null;
  };
  slock = callPackage ../misc/screensavers/slock { };

  snscrape = with python3Packages; toPythonApplication snscrape;