Created
March 19, 2021 09:13
-
-
Save aforemny/2ba6656b10d9815f67205d9641fd07e6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ cat idiotbox.nix | |
{ pkgs ? import <nixpkgs> { } }: | |
{ | |
idiotbox = pkgs.callPackage ( | |
{ stdenv, fetchurl, libressl }: | |
stdenv.mkDerivation rec { | |
pname = "idiotbox"; | |
version = "0.4"; | |
src = fetchurl { | |
url = "https://www.codemadness.org/releases/frontends/frontends-${version}.tar.gz"; | |
hash = "sha256-ajbyV/6O5rbnetomJEVq+MT9mKg/94wooz4FKdXNvEk="; | |
}; | |
buildInputs = [ libressl ]; | |
buildPhase = ''make youtube''; | |
} | |
){}; | |
} | |
$ nix build idiotbox.nix -A idiotbox | |
this derivation will be built: | |
/nix/store/81k644ksl6m7vw2xx6c9mnawybzdg6sk-idiotbox-0.4.drv | |
these 2 paths will be fetched (0.37 MiB download, 1.94 MiB unpacked): | |
/nix/store/bfcj24jddm8wwfgr2wi5nkcj6pqrv6mk-libressl-3.2.5-dev | |
/nix/store/sjccs0rkl3vfkvk2nqp2mih7i5badim2-libressl-3.2.5-bin | |
copying path '/nix/store/sjccs0rkl3vfkvk2nqp2mih7i5badim2-libressl-3.2.5-bin' from 'https://cache.nixos.org'... | |
copying path '/nix/store/bfcj24jddm8wwfgr2wi5nkcj6pqrv6mk-libressl-3.2.5-dev' from 'https://cache.nixos.org'... | |
building '/nix/store/81k644ksl6m7vw2xx6c9mnawybzdg6sk-idiotbox-0.4.drv'... | |
unpacking sources | |
unpacking source archive /nix/store/68186990c9ddr1zs8a93c7s4kynzvbak-frontends-0.4.tar.gz | |
source root is frontends-0.4 | |
setting SOURCE_DATE_EPOCH to timestamp 1606178006 of file frontends-0.4/youtube/youtube.h | |
patching sources | |
configuring | |
no configure script, doing nothing | |
building | |
gcc -I../ -I. -O1 -o https.o -c https.c | |
ar rc libhttps.a https.o | |
ranlib libhttps.a | |
gcc -I../ -I. -O1 -o json.o -c json.c | |
ar rc libjson.a json.o | |
ranlib libjson.a | |
gcc -I../ -I. -O1 -o util.o -c util.c | |
util.c: In function 'utf8pad': | |
util.c:157:12: warning: implicit declaration of function 'wcwidth' [8;;https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wimplicit-function-declaration-Wimplicit-function-declaration8;;] | |
157 | if ((w = wcwidth(wc)) == -1) | |
| ^~~~~~~ | |
ar rc libutil.a util.o | |
ranlib libutil.a | |
gcc -I../ -I. -O1 -o xml.o -c xml.c | |
ar rc libxml.a xml.o | |
ranlib libxml.a | |
gcc -I../ -I. -O1 -o strlcat.o -c strlcat.c | |
gcc -I../ -I. -O1 -o strlcpy.o -c strlcpy.c | |
gcc -I../ -I. -O1 -o youtube/youtube.o -c youtube/youtube.c | |
gcc -I../ -I. -O1 -o youtube/cgi.o -c youtube/cgi.c | |
gcc -o youtube/cgi youtube/cgi.o youtube/youtube.o libhttps.a libjson.a libutil.a libxml.a strlcat.o strlcpy.o -ltls -lssl -lcrypto -static | |
/nix/store/cp1sa3xxvl71cypiinw2c62i5s33chlr-binutils-2.35.1/bin/ld: cannot find -ltls | |
/nix/store/cp1sa3xxvl71cypiinw2c62i5s33chlr-binutils-2.35.1/bin/ld: cannot find -lssl | |
/nix/store/cp1sa3xxvl71cypiinw2c62i5s33chlr-binutils-2.35.1/bin/ld: cannot find -lcrypto | |
/nix/store/cp1sa3xxvl71cypiinw2c62i5s33chlr-binutils-2.35.1/bin/ld: cannot find -lc | |
collect2: error: ld returned 1 exit status | |
make: *** [Makefile:103: youtube/cgi] Error 1 | |
error: builder for '/nix/store/81k644ksl6m7vw2xx6c9mnawybzdg6sk-idiotbox-0.4.drv' failed with exit code 2; | |
last 10 log lines: | |
> gcc -I../ -I. -O1 -o strlcpy.o -c strlcpy.c | |
> gcc -I../ -I. -O1 -o youtube/youtube.o -c youtube/youtube.c | |
> gcc -I../ -I. -O1 -o youtube/cgi.o -c youtube/cgi.c | |
> gcc -o youtube/cgi youtube/cgi.o youtube/youtube.o libhttps.a libjson.a libutil.a libxml.a strlcat.o strlcpy.o -ltls -lssl -lcrypto -static | |
> /nix/store/cp1sa3xxvl71cypiinw2c62i5s33chlr-binutils-2.35.1/bin/ld: cannot find -ltls | |
> /nix/store/cp1sa3xxvl71cypiinw2c62i5s33chlr-binutils-2.35.1/bin/ld: cannot find -lssl | |
> /nix/store/cp1sa3xxvl71cypiinw2c62i5s33chlr-binutils-2.35.1/bin/ld: cannot find -lcrypto | |
> /nix/store/cp1sa3xxvl71cypiinw2c62i5s33chlr-binutils-2.35.1/bin/ld: cannot find -lc | |
> collect2: error: ld returned 1 exit status | |
> make: *** [Makefile:103: youtube/cgi] Error 1 | |
For full logs, run 'nix log /nix/store/81k644ksl6m7vw2xx6c9mnawybzdg6sk-idiotbox-0.4.drv'. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Turns out it works without
-static