cosmopolitan: unstable-2022-03-22 -> 2.0.1
This commit is contained in:
@@ -1,16 +1,21 @@
|
||||
{ lib, stdenv, fetchFromGitHub, unzip, bintools-unwrapped }:
|
||||
{ lib, stdenv, fetchFromGitHub, unzip, bintools-unwrapped, coreutils, substituteAll }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "cosmopolitan";
|
||||
version = "unstable-2022-03-22";
|
||||
version = "2.0.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "jart";
|
||||
repo = "cosmopolitan";
|
||||
rev = "5022f9e9207ff2b79ddd6de6d792d3280e12fb3a";
|
||||
sha256 = "sha256-UjL4wR5HhuXiQXg6Orcx2fKiVGRPMJk15P779BP1fRA=";
|
||||
repo = pname;
|
||||
rev = version;
|
||||
sha256 = "sha256-EPye7IRMmYHF7XYdDaJdA8alCLiF7MOkU/fVAzZA794=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
# make sure tests set PATH correctly
|
||||
(substituteAll { src = ./fix-paths.patch; inherit coreutils; })
|
||||
];
|
||||
|
||||
nativeBuildInputs = [ bintools-unwrapped unzip ];
|
||||
|
||||
outputs = [ "out" "dist" ];
|
||||
@@ -24,11 +29,16 @@ stdenv.mkDerivation rec {
|
||||
dontConfigure = true;
|
||||
dontFixup = true;
|
||||
|
||||
preCheck = ''
|
||||
# some syscall tests fail because we're in a sandbox
|
||||
rm test/libc/calls/sched_setscheduler_test.c
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
mkdir -p $out/{include,lib}
|
||||
install o/cosmopolitan.h $out/include
|
||||
install o/cosmopolitan.a o/libc/crt/crt.o o/ape/ape.{o,lds} $out/lib
|
||||
install o/cosmopolitan.a o/libc/crt/crt.o o/ape/ape.{o,lds} o/ape/ape-no-modify-self.o $out/lib
|
||||
|
||||
cp -RT . "$dist"
|
||||
runHook postInstall
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
--- a/test/tool/plinko/plinko_test.c
|
||||
+++ b/test/tool/plinko/plinko_test.c
|
||||
@@ -91,8 +91,8 @@ TEST(plinko, worksOrPrintsNiceError) {
|
||||
sigaction(SIGQUIT, &savequit, 0);
|
||||
sigaction(SIGPIPE, &savepipe, 0);
|
||||
sigprocmask(SIG_SETMASK, &savemask, 0);
|
||||
execve("bin/plinko.com", (char *const[]){"bin/plinko.com", 0},
|
||||
- (char *const[]){0});
|
||||
+ (char *const[]){"PATH=@coreutils@/bin", 0});
|
||||
_exit(127);
|
||||
}
|
||||
close(pfds[0][0]);
|
||||
Reference in New Issue
Block a user