4a7f99d55d
Part of: https://github.com/NixOS/nixpkgs/issues/108938 meta = with stdenv.lib; is a widely used pattern. We want to slowly remove the `stdenv.lib` indirection and encourage people to use `lib` directly. Thus let’s start with the meta field. This used a rewriting script to mostly automatically replace all occurances of this pattern, and add the `lib` argument to the package header if it doesn’t exist yet. The script in its current form is available at https://cs.tvl.fyi/depot@2f807d7f141068d2d60676a89213eaa5353ca6e0/-/blob/users/Profpatsch/nixpkgs-rewriter/default.nix
40 lines
1.0 KiB
Nix
40 lines
1.0 KiB
Nix
{ lib, stdenv, fetchFromGitHub, slurm } :
|
|
let
|
|
version = "0.2.5";
|
|
in
|
|
stdenv.mkDerivation {
|
|
name = "slurm-spank-x11-${version}";
|
|
version = version;
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "hautreux";
|
|
repo = "slurm-spank-x11";
|
|
rev = version;
|
|
sha256 = "1dmsr7whxcxwnlvl1x4s3bqr5cr6q5ssb28vqi67w5hj4sshisry";
|
|
};
|
|
|
|
buildPhase = ''
|
|
gcc -DX11_LIBEXEC_PROG="\"$out/bin/slurm-spank-x11\"" \
|
|
-g -o slurm-spank-x11 slurm-spank-x11.c
|
|
gcc -I${slurm.dev}/include -DX11_LIBEXEC_PROG="\"$out/bin/slurm-spank-x11\"" -shared -fPIC \
|
|
-g -o x11.so slurm-spank-x11-plug.c
|
|
'';
|
|
|
|
installPhase = ''
|
|
mkdir -p $out/bin $out/lib
|
|
install -m 755 slurm-spank-x11 $out/bin
|
|
install -m 755 x11.so $out/lib
|
|
'';
|
|
|
|
meta = with lib; {
|
|
homepage = "https://github.com/hautreux/slurm-spank-x11";
|
|
description = "Plugin for SLURM to allow for interactive X11 sessions";
|
|
platforms = platforms.linux;
|
|
license = licenses.gpl3;
|
|
maintainers = with maintainers; [ markuskowa ];
|
|
};
|
|
}
|
|
|
|
|
|
|