1 { lib, stdenv, fetchurl, coreutils, openssh, gnutar }:
3 stdenv.mkDerivation rec {
8 url = "https://scriptedconfiguration.org/code/${pname}-${version}.tar.gz";
9 sha256 = "0916f96afl8kcn2hpj4qhg92g2j93ycp2sb94nsz3q44sqc6ddhb";
12 patches = [ ./paths.patch ];
15 substituteInPlace rset.c \
16 --replace @ssh@ ${openssh}/bin/ssh \
17 --replace @miniquark@ $out/bin/miniquark \
18 --replace @rinstall@ $out/bin/rinstall \
19 --replace @rsub@ $out/bin/rsub
21 substituteInPlace execute.c \
22 --replace @ssh@ ${openssh}/bin/ssh \
23 --replace @ssh-add@ ${openssh}/bin/ssh-add \
24 --replace @tar@ ${gnutar}/bin/tar
26 substituteInPlace rutils.c \
27 --replace @install@ ${coreutils}/bin/install
30 # these are to be run on the remote host,
31 # so we want to preserve the original shebang.
33 sed -i "1s@.*@#!/bin/sh@" $out/bin/rinstall
34 sed -i "1s@.*@#!/bin/sh@" $out/bin/rsub
38 installFlags = [ "PREFIX=$(out)" ];
41 homepage = "https://scriptedconfiguration.org/";
42 description = "Configure systems using any scripting language";
43 changelog = "https://github.com/eradman/rset/raw/${version}/NEWS";
44 license = licenses.isc;
45 platforms = platforms.unix;
47 # 2023-08-19, fails to compile with glibc-2.38 because of strlcpy.
48 # At the time of writing, this was 4 minors behind already and
49 # the `paths.patch` didn't apply anymore, so this is now considered
50 # broken until somebody cares enough to fix and upgrade this.