about summary refs log blame commit diff stats
path: root/shell.nix
blob: 17540fe8ae53772eab413aba81ef3baa41c5cdbb (plain) (tree)

















                                                                                                                           
{ pkgs ? import (fetchTarball "https://github.com/NixOS/nixpkgs/archive/nixos-21.11.tar.gz") {} }:

pkgs.mkShell {
	LOCALE_ARCHIVE_2_27 = if (pkgs.glibcLocales != null) then "${pkgs.glibcLocales}/lib/locale/locale-archive" else "";

	buildInputs = [
		pkgs.glibcLocales
		pkgs.git
		pkgs.gnumake
		pkgs.ncurses
		pkgs.gcc
		pkgs.openssl
	];
	shellHook = ''
		export LC_ALL=en_US.UTF-8
		export GIT_SSL_CAINFO=/etc/ssl/certs/ca-certificates.crt
		export SSL_CERT_FILE=/etc/ssl/certs/ca-certificates.crt
	'';
}
an>int size) { fprintf(stderr, "fatal: could not malloc() %d bytes\n", (int) size); exit(1); } /* extern functions */ void * emallocz(unsigned int size) { void *res = calloc(1, size); if(!res) bad_malloc(size); return res; } void eprint(const char *errstr, ...) { va_list ap; va_start(ap, errstr); vfprintf(stderr, errstr, ap); va_end(ap); exit(1); } void spawn(Arg *arg) { char **argv = (char **)arg->argv; if(!argv || !argv[0]) return; if(fork() == 0) { if(fork() == 0) { if(dpy) close(ConnectionNumber(dpy)); setsid(); execvp(argv[0], argv); fprintf(stderr, "dwm: execvp %s", argv[0]); perror(" failed"); } exit (0); } wait(0); }