Loading pkgs/by-name/ob/objfw/package.nix +1 −38 Original line number Diff line number Diff line Loading @@ -33,44 +33,7 @@ clangStdenv.mkDerivation (finalAttrs: { doCheck = true; passthru.tests = { build-hello-world = clangStdenv.mkDerivation { name = "ObjFW test"; buildInputs = [ objfw ]; src = writeTextDir "helloworld.m" '' #import <ObjFW/ObjFW.h> int main() { OFLog(@"Hello world from objc"); return 0; } ''; buildPhase = '' runHook preBuild clang -o testbinary \ -x objective-c -Xclang \ -fobjc-runtime=objfw \ -funwind-tables \ -fconstant-string-class=OFConstantString \ -Xclang -fno-constant-cfstrings \ helloworld.m \ -lobjfw -lobjfwrt runHook postBuild ''; checkPhase = '' runHook preCheck ./testbinary runHook postCheck ''; doCheck = true; installPhase = '' runHook preInstall touch $out runHook postInstall ''; }; build-hello-world = (import ./test-build-and-run.nix) { inherit clangStdenv objfw writeTextDir; }; }; meta = { Loading pkgs/by-name/ob/objfw/test-build-and-run.nix 0 → 100644 +44 −0 Original line number Diff line number Diff line { clangStdenv, objfw, writeTextDir, }: clangStdenv.mkDerivation { name = "ObjFW test"; buildInputs = [ objfw ]; src = writeTextDir "helloworld.m" '' #import <ObjFW/ObjFW.h> int main() { OFLog(@"Hello world from objc"); return 0; } ''; buildPhase = '' runHook preBuild clang -o testbinary \ -x objective-c -Xclang \ -fobjc-runtime=objfw \ -funwind-tables \ -fconstant-string-class=OFConstantString \ -Xclang -fno-constant-cfstrings \ helloworld.m \ -lobjfw -lobjfwrt runHook postBuild ''; checkPhase = '' runHook preCheck ./testbinary runHook postCheck ''; doCheck = true; installPhase = '' runHook preInstall touch $out runHook postInstall ''; } Loading
pkgs/by-name/ob/objfw/package.nix +1 −38 Original line number Diff line number Diff line Loading @@ -33,44 +33,7 @@ clangStdenv.mkDerivation (finalAttrs: { doCheck = true; passthru.tests = { build-hello-world = clangStdenv.mkDerivation { name = "ObjFW test"; buildInputs = [ objfw ]; src = writeTextDir "helloworld.m" '' #import <ObjFW/ObjFW.h> int main() { OFLog(@"Hello world from objc"); return 0; } ''; buildPhase = '' runHook preBuild clang -o testbinary \ -x objective-c -Xclang \ -fobjc-runtime=objfw \ -funwind-tables \ -fconstant-string-class=OFConstantString \ -Xclang -fno-constant-cfstrings \ helloworld.m \ -lobjfw -lobjfwrt runHook postBuild ''; checkPhase = '' runHook preCheck ./testbinary runHook postCheck ''; doCheck = true; installPhase = '' runHook preInstall touch $out runHook postInstall ''; }; build-hello-world = (import ./test-build-and-run.nix) { inherit clangStdenv objfw writeTextDir; }; }; meta = { Loading
pkgs/by-name/ob/objfw/test-build-and-run.nix 0 → 100644 +44 −0 Original line number Diff line number Diff line { clangStdenv, objfw, writeTextDir, }: clangStdenv.mkDerivation { name = "ObjFW test"; buildInputs = [ objfw ]; src = writeTextDir "helloworld.m" '' #import <ObjFW/ObjFW.h> int main() { OFLog(@"Hello world from objc"); return 0; } ''; buildPhase = '' runHook preBuild clang -o testbinary \ -x objective-c -Xclang \ -fobjc-runtime=objfw \ -funwind-tables \ -fconstant-string-class=OFConstantString \ -Xclang -fno-constant-cfstrings \ helloworld.m \ -lobjfw -lobjfwrt runHook postBuild ''; checkPhase = '' runHook preCheck ./testbinary runHook postCheck ''; doCheck = true; installPhase = '' runHook preInstall touch $out runHook postInstall ''; }