base16-schemes: unstable-2024-06-21 -> unstable-2024-11-12
[NixPkgs.git] / pkgs / by-name / rs / rset / package.nix
blob2d6a8da445c1fcb9ee74f658d3878994e40ad9e4
1 { lib, stdenv, fetchurl, coreutils, openssh, gnutar }:
3 stdenv.mkDerivation rec {
4   pname = "rset";
5   version = "2.1";
7   src = fetchurl {
8     url = "https://scriptedconfiguration.org/code/${pname}-${version}.tar.gz";
9     sha256 = "0916f96afl8kcn2hpj4qhg92g2j93ycp2sb94nsz3q44sqc6ddhb";
10   };
12   patches = [ ./paths.patch ];
14   postPatch = ''
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
28   '';
30   # these are to be run on the remote host,
31   # so we want to preserve the original shebang.
32   postFixup = ''
33     sed -i "1s@.*@#!/bin/sh@" $out/bin/rinstall
34     sed -i "1s@.*@#!/bin/sh@" $out/bin/rsub
35   '';
37   dontAddPrefix = true;
38   installFlags = [ "PREFIX=$(out)" ];
40   meta = with lib; {
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;
46     maintainers = [ ];
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.
51     broken = true;
52   };