Skip to content

Instantly share code, notes, and snippets.

@infinisil
Last active March 31, 2019 06:59
Show Gist options
  • Save infinisil/fa3016416a6fa4430c50d9ac3c7dd3c9 to your computer and use it in GitHub Desktop.
Save infinisil/fa3016416a6fa4430c50d9ac3c7dd3c9 to your computer and use it in GitHub Desktop.
with import <nixpkgs> {};
stdenv.mkDerivation rec {
pname = "tinytetris";
version = "2019-03-31";
src = fetchFromGitHub {
owner = "taylorconor";
repo = pname;
rev = "1292493f75498e40a089f8d424708702951b5d7e";
sha256 = "1iihrmqb1kmav8s9lmy4bjpk3ahshk8k9gkhv3zi6rcr48s8d0vc";
};
buildInputs = [ ncurses ];
buildPhase = ''
g++ -lncurses tinytetris.cpp -o tinytetris
'';
installPhase = ''
mkdir -p $out/bin
mv tinytetris $out/bin
'';
}
@infinisil
Copy link
Author

these derivations will be built:
  /nix/store/c7q3hd5lhsvm0ylda1x2lc2ah6dvpxbp-tinytetris-2019-03-31.drv
building '/nix/store/c7q3hd5lhsvm0ylda1x2lc2ah6dvpxbp-tinytetris-2019-03-31.drv'...
unpacking sources
unpacking source archive /nix/store/wz3xrdznyz4733mkvhpvz6wqxa9jhg67-source
source root is source
patching sources
configuring
no configure script, doing nothing
building
/build/ccRRc29u.o: In function `frame()':
tinytetris-commented.cpp:(.text+0xfc): undefined reference to `stdscr'
tinytetris-commented.cpp:(.text+0x119): undefined reference to `move'
tinytetris-commented.cpp:(.text+0x12a): undefined reference to `printw'
tinytetris-commented.cpp:(.text+0x141): undefined reference to `wattr_off'
tinytetris-commented.cpp:(.text+0x160): undefined reference to `wattr_on'
tinytetris-commented.cpp:(.text+0x185): undefined reference to `move'
tinytetris-commented.cpp:(.text+0x19c): undefined reference to `printw'
/build/ccRRc29u.o: In function `runloop()':
tinytetris-commented.cpp:(.text+0x578): undefined reference to `stdscr'
tinytetris-commented.cpp:(.text+0x580): undefined reference to `wgetch'
/build/ccRRc29u.o: In function `frame()':
tinytetris-commented.cpp:(.text+0x1a9): undefined reference to `refresh'
/build/ccRRc29u.o: In function `main':
tinytetris-commented.cpp:(.text.startup+0x15): undefined reference to `initscr'
tinytetris-commented.cpp:(.text.startup+0x1a): undefined reference to `start_color'
tinytetris-commented.cpp:(.text.startup+0x2a): undefined reference to `init_pair'
tinytetris-commented.cpp:(.text.startup+0x43): undefined reference to `resizeterm'
tinytetris-commented.cpp:(.text.startup+0x48): undefined reference to `noecho'
tinytetris-commented.cpp:(.text.startup+0x4f): undefined reference to `stdscr'
tinytetris-commented.cpp:(.text.startup+0x59): undefined reference to `wtimeout'
tinytetris-commented.cpp:(.text.startup+0x60): undefined reference to `curs_set'
tinytetris-commented.cpp:(.text.startup+0x6c): undefined reference to `box'
tinytetris-commented.cpp:(.text.startup+0x76): undefined reference to `endwin'
collect2: error: ld returned 1 exit status
builder for '/nix/store/c7q3hd5lhsvm0ylda1x2lc2ah6dvpxbp-tinytetris-2019-03-31.drv' failed with exit code 1
error: build of '/nix/store/c7q3hd5lhsvm0ylda1x2lc2ah6dvpxbp-tinytetris-2019-03-31.drv' failed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment