-
-
Notifications
You must be signed in to change notification settings - Fork 15.9k
openbsd: init at 7.5 #311836
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
openbsd: init at 7.5 #311836
Changes from all commits
d9c9da5
222a29e
0c6d2ee
d0b08ab
ad6fa01
888dee4
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
{ | ||
lib, | ||
mkDerivation, | ||
fetchNetBSD, | ||
stdenv, | ||
bsdSetupHook, | ||
netbsdSetupHook, | ||
rsync, | ||
}: | ||
|
||
mkDerivation { | ||
path = "share/mk"; | ||
sha256 = "0w9x77cfnm6zwy40slradzi0ip9gz80x6lk7pvnlxzsr2m5ra5sy"; | ||
ali-abrar marked this conversation as resolved.
Show resolved
Hide resolved
|
||
version = "9.2"; | ||
noCC = true; | ||
|
||
buildInputs = [ ]; | ||
nativeBuildInputs = [ | ||
bsdSetupHook | ||
netbsdSetupHook | ||
rsync | ||
Ericson2314 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
]; | ||
|
||
dontBuild = true; | ||
|
||
postPatch = | ||
'' | ||
substituteInPlace $BSDSRCDIR/share/mk/bsd.doc.mk \ | ||
--replace '-o ''${DOCOWN}' "" \ | ||
--replace '-g ''${DOCGRP}' "" | ||
for mk in $BSDSRCDIR/share/mk/bsd.inc.mk $BSDSRCDIR/share/mk/bsd.kinc.mk; do | ||
substituteInPlace $mk \ | ||
--replace '-o ''${BINOWN}' "" \ | ||
--replace '-g ''${BINGRP}' "" | ||
done | ||
substituteInPlace $BSDSRCDIR/share/mk/bsd.kmodule.mk \ | ||
--replace '-o ''${KMODULEOWN}' "" \ | ||
--replace '-g ''${KMODULEGRP}' "" | ||
substituteInPlace $BSDSRCDIR/share/mk/bsd.lib.mk \ | ||
--replace '-o ''${LIBOWN}' "" \ | ||
--replace '-g ''${LIBGRP}' "" \ | ||
--replace '-o ''${DEBUGOWN}' "" \ | ||
--replace '-g ''${DEBUGGRP}' "" | ||
substituteInPlace $BSDSRCDIR/share/mk/bsd.lua.mk \ | ||
--replace '-o ''${LIBOWN}' "" \ | ||
--replace '-g ''${LIBGRP}' "" | ||
substituteInPlace $BSDSRCDIR/share/mk/bsd.man.mk \ | ||
--replace '-o ''${MANOWN}' "" \ | ||
--replace '-g ''${MANGRP}' "" | ||
substituteInPlace $BSDSRCDIR/share/mk/bsd.nls.mk \ | ||
--replace '-o ''${NLSOWN}' "" \ | ||
--replace '-g ''${NLSGRP}' "" | ||
substituteInPlace $BSDSRCDIR/share/mk/bsd.prog.mk \ | ||
--replace '-o ''${BINOWN}' "" \ | ||
--replace '-g ''${BINGRP}' "" \ | ||
--replace '-o ''${RUMPBINOWN}' "" \ | ||
--replace '-g ''${RUMPBINGRP}' "" \ | ||
--replace '-o ''${DEBUGOWN}' "" \ | ||
--replace '-g ''${DEBUGGRP}' "" | ||
|
||
substituteInPlace $BSDSRCDIR/share/mk/bsd.lib.mk \ | ||
--replace '_INSTRANLIB=''${empty(PRESERVE):?-a "''${RANLIB} -t":}' '_INSTRANLIB=' | ||
substituteInPlace $BSDSRCDIR/share/mk/bsd.kinc.mk \ | ||
--replace /bin/rm rm | ||
'' | ||
+ lib.optionalString stdenv.targetPlatform.isDarwin '' | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Was changing this from There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The make rules are always a build-time input to something, so I don't really get the sense of getting in the host platform of the rules themselves (i.e. the build platform of the thing to be built). There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't know the purpose of this bit though, which doesn't help either. |
||
substituteInPlace $BSDSRCDIR/share/mk/bsd.sys.mk \ | ||
--replace '-Wl,--fatal-warnings' "" \ | ||
--replace '-Wl,--warn-shared-textrel' "" | ||
''; | ||
|
||
installPhase = '' | ||
cp -r . $out | ||
''; | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
{ | ||
stdenv, | ||
lib, | ||
stdenvNoCC, | ||
makeScopeWithSplicing', | ||
generateSplicesForMkScope, | ||
pkgs, | ||
buildPackages, | ||
netbsd, | ||
}: | ||
|
||
makeScopeWithSplicing' { | ||
otherSplices = generateSplicesForMkScope "openbsd"; | ||
f = ( | ||
self: | ||
lib.packagesFromDirectoryRecursive { | ||
callPackage = self.callPackage; | ||
directory = ./pkgs; | ||
} | ||
// { | ||
libc = self.callPackage ./pkgs/libc/package.nix { | ||
inherit (self) csu include lorder; | ||
inherit (buildPackages.openbsd) makeMinimal; | ||
inherit (buildPackages.netbsd) | ||
install | ||
gencat | ||
rpcgen | ||
tsort | ||
; | ||
}; | ||
makeMinimal = buildPackages.netbsd.makeMinimal.override { inherit (self) make-rules; }; | ||
mkDerivation = self.callPackage ./pkgs/mkDerivation.nix { | ||
inherit stdenv; | ||
inherit (buildPackages.netbsd) install; | ||
}; | ||
include = self.callPackage ./pkgs/include/package.nix { | ||
inherit (buildPackages.openbsd) makeMinimal; | ||
inherit (buildPackages.netbsd) install rpcgen mtree; | ||
}; | ||
csu = self.callPackage ./pkgs/csu.nix { | ||
inherit (self) include; | ||
inherit (buildPackages.openbsd) makeMinimal; | ||
inherit (buildPackages.netbsd) install; | ||
}; | ||
make-rules = self.callPackage ./pkgs/make-rules/package.nix { }; | ||
lorder = self.callPackage ./pkgs/lorder.nix { inherit (buildPackages.netbsd) install; }; | ||
} | ||
); | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
{ | ||
lib, | ||
mkDerivation, | ||
bsdSetupHook, | ||
openbsdSetupHook, | ||
makeMinimal, | ||
install, | ||
include, | ||
}: | ||
|
||
mkDerivation { | ||
path = "lib/csu"; | ||
nativeBuildInputs = [ | ||
bsdSetupHook | ||
openbsdSetupHook | ||
makeMinimal | ||
install | ||
]; | ||
buildInputs = [ include ]; | ||
meta.platforms = lib.platforms.openbsd; | ||
extraPaths = [ "libexec/ld.so" ]; | ||
} |
Uh oh!
There was an error while loading. Please reload this page.