nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 stdenv,
4 fetchurl,
5 ncurses,
6 libressl,
7 patches ? [ ], # allow users to easily override config.def.h
8}:
9
10stdenv.mkDerivation rec {
11 pname = "sacc";
12 version = "1.07";
13
14 src = fetchurl {
15 url = "ftp://bitreich.org/releases/sacc/sacc-${version}.tar.gz";
16 hash = "sha256-LdEeZH+JWb7iEEzikAXaxG0N5GMPxjgTId4THLgdU2w=";
17 };
18
19 inherit patches;
20
21 buildInputs = [
22 ncurses
23 libressl
24 ];
25
26 makeFlags = lib.optionals stdenv.hostPlatform.isDarwin [
27 "OSCFLAGS=-D_DARWIN_C_SOURCE"
28 ];
29
30 postPatch = ''
31 substituteInPlace config.mk \
32 --replace curses ncurses \
33 --replace "/usr/local" "$out"
34 '';
35
36 meta = with lib; {
37 description = "Terminal gopher client";
38 mainProgram = "sacc";
39 homepage = "gopher://bitreich.org/1/scm/sacc";
40 license = licenses.isc;
41 maintainers = [ maintainers.sternenseemann ];
42 platforms = platforms.unix;
43 };
44}