tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
0
fork
atom
lol
0
fork
atom
overview
issues
pulls
pipelines
openbsd: remove
Matthew Bauer
8 years ago
6bc19398
c65000af
+1
-52
3 changed files
expand all
collapse all
unified
split
pkgs
os-specific
bsd
default.nix
openbsd
default.nix
top-level
all-packages.nix
-3
pkgs/os-specific/bsd/default.nix
reviewed
···
2
2
3
3
rec {
4
4
netbsd = recurseIntoAttrs (callPackages ./netbsd {});
5
5
-
openbsd = recurseIntoAttrs (callPackages ./openbsd {
6
6
-
inherit (netbsd) compat netBSDDerivation libcurses libterminfo;
7
7
-
});
8
5
}
-48
pkgs/os-specific/bsd/openbsd/default.nix
reviewed
···
1
1
-
{ fetchcvs, netBSDDerivation, compat, libcurses, libterminfo }:
2
2
-
3
3
-
let
4
4
-
fetchOpenBSD = path: version: sha256: fetchcvs {
5
5
-
cvsRoot = "anoncvs@anoncvs.ca.openbsd.org:/cvs";
6
6
-
module = "src/${path}";
7
7
-
inherit sha256;
8
8
-
tag = "OPENBSD_${builtins.replaceStrings ["."] ["_"] version}";
9
9
-
};
10
10
-
11
11
-
# OpenBSD is a fork of NetBSD
12
12
-
# We can build it with minimal changes
13
13
-
openBSDDerivation = attrs: netBSDDerivation (attrs // {
14
14
-
name = "${attrs.pname or (baseNameOf attrs.path)}-openbsd-${attrs.version}";
15
15
-
src = fetchOpenBSD attrs.path attrs.version attrs.sha256;
16
16
-
});
17
17
-
18
18
-
in {
19
19
-
20
20
-
mg = openBSDDerivation {
21
21
-
path = "usr.bin/mg";
22
22
-
version = "6.3";
23
23
-
sha256 = "0n3hwa81c2mcjwbmidrbvi1l25jh8hy939kqrigbv78jixpynffc";
24
24
-
buildInputs = [ compat libcurses libterminfo ];
25
25
-
patchPhase = ''
26
26
-
NIX_CFLAGS_COMPILE+=" -I$BSDSRCDIR/sys"
27
27
-
substituteInPlace fileio.c \
28
28
-
--replace "bp->b_fi.fi_mtime.tv_sec != sb.st_mtimespec.tv_sec" "bp->b_fi.fi_mtime.tv_sec != sb.st_mtim.tv_sec" \
29
29
-
--replace "bp->b_fi.fi_mtime.tv_nsec != sb.st_mtimespec.tv_nsec" "bp->b_fi.fi_mtime.tv_nsec != sb.st_mtim.tv_nsec" \
30
30
-
--replace "bp->b_fi.fi_mtime = sb.st_mtimespec" "bp->b_fi.fi_mtime = sb.st_mtim"
31
31
-
substituteInPlace Makefile \
32
32
-
--replace "-o root -g wheel" "" \
33
33
-
--replace '-o ''${DOCOWN} -g ''${DOCGRP}' ""
34
34
-
'';
35
35
-
NIX_CFLAGS_COMPILE = [ "-DTCSASOFT=0x10" "-Dpledge(a,b)=0" ];
36
36
-
preBuild = ''
37
37
-
cc -c $BSDSRCDIR/lib/libc/stdlib/strtonum.c -o strtonum.o
38
38
-
NIX_LDFLAGS+=" strtonum.o"
39
39
-
'';
40
40
-
extraPaths = [
41
41
-
(fetchOpenBSD "sys/sys/tree.h" "6.3" "0rimh41wn9wz5m510zk9i27z3s450qqgq2k5xn8kp3885hygbcj9")
42
42
-
(fetchOpenBSD "sys/sys/_null.h" "6.3" "0l2rgg9ai4ivfl07zmbqli19vnm3lj7qkxpikqplmzrfp36qpzgr")
43
43
-
(fetchOpenBSD "sys/sys/_null.h" "6.3" "0l2rgg9ai4ivfl07zmbqli19vnm3lj7qkxpikqplmzrfp36qpzgr")
44
44
-
(fetchOpenBSD "lib/libc/stdlib/strtonum.c" "6.3" "0xn3qxvb3g76hz698sjkf85p07zrcdv2g31inp8caqw2mpk6jadv")
45
45
-
];
46
46
-
};
47
47
-
48
48
-
}
+1
-1
pkgs/top-level/all-packages.nix
reviewed
···
21379
21379
mount wall hostname more sysctl;
21380
21380
21381
21381
inherit (recurseIntoAttrs (callPackages ../os-specific/bsd { }))
21382
21382
-
netbsd openbsd;
21382
21382
+
netbsd;
21383
21383
}