Adopt a few packages

This commit is contained in:
Michael Raskin 2014-11-05 11:12:35 +03:00
parent 167115f1a2
commit bc5f55cc91
7 changed files with 64 additions and 54 deletions

View File

@ -21,5 +21,6 @@ stdenv.mkDerivation {
meta = { meta = {
description = "A Unicode font"; description = "A Unicode font";
maintainers = [stdenv.lib.maintainers.raskin];
}; };
} }

View File

@ -34,5 +34,6 @@ wrapFonts (stdenv.mkDerivation {
meta = { meta = {
description = "Unicode bitmap fonts"; description = "Unicode bitmap fonts";
maintainers = [stdenv.lib.maintainers.raskin];
}; };
}) })

View File

@ -45,6 +45,7 @@ stdenv.mkDerivation {
''; '';
meta = { meta = {
description = "Falling Sand Game - a cellular automata engine tuned towards the likes of Falling Sand"; description = "Cellular automata engine tuned towards the likes of Falling Sand";
maintainers = [stdenv.lib.maintainers.raskin];
}; };
} }

View File

@ -45,5 +45,7 @@ rec {
name = "xsokoban-" + version; name = "xsokoban-" + version;
meta = { meta = {
description = "X sokoban"; description = "X sokoban";
license = a.stdemv.lib.licenses.publicDomain;
maintainers = [ a.stdenv.lib.maintainers.raskin ];
}; };
} }

View File

@ -3,57 +3,61 @@
# !!! What does this package do, and does it belong in Nixpkgs? # !!! What does this package do, and does it belong in Nixpkgs?
stdenv.mkDerivation { stdenv.mkDerivation {
name = "xlaunch"; name = "xlaunch";
inherit xorgserver; inherit xorgserver;
buildCommand = " buildCommand = "
cat << EOF > realizeuid.c cat << EOF > realizeuid.c
#include <sys/types.h> #include <sys/types.h>
#include <unistd.h> #include <unistd.h>
#include <stdio.h> #include <stdio.h>
int main(int argc, char ** argv, char ** envp) int main(int argc, char ** argv, char ** envp)
{ {
uid_t a,b,c; uid_t a,b,c;
int i; int i;
char *nargv[10000]; char *nargv[10000];
char arg1 [10]; char arg1 [10];
nargv[0]=argv[0]; nargv[0]=argv[0];
for (i=1; i<=argc; i++){ for (i=1; i<=argc; i++){
nargv[i+1]=argv[i]; nargv[i+1]=argv[i];
} }
nargv[1]=arg1; nargv[1]=arg1;
getresuid (&a,&b,&c); getresuid (&a,&b,&c);
snprintf(arg1,8,\"%d\",a); snprintf(arg1,8,\"%d\",a);
setresuid(c,c,c); setresuid(c,c,c);
execve(\"\$out/libexec/xlaunch\", nargv, envp); execve(\"\$out/libexec/xlaunch\", nargv, envp);
} }
EOF EOF
mkdir -p \$out/bin mkdir -p \$out/bin
mkdir -p \$out/libexec mkdir -p \$out/libexec
gcc realizeuid.c -o \$out/bin/xlaunch gcc realizeuid.c -o \$out/bin/xlaunch
echo '#! ${stdenv.shell} echo '#! ${stdenv.shell}
USER=\$(egrep '\\''^[-a-z0-9A-Z_]*:[^:]*:'\\''\$1'\\'':'\\'' /etc/passwd | sed -e '\\''s/:.*//'\\'' ) USER=\$(egrep '\\''^[-a-z0-9A-Z_]*:[^:]*:'\\''\$1'\\'':'\\'' /etc/passwd | sed -e '\\''s/:.*//'\\'' )
shift shift
case \"\$1\" in case \"\$1\" in
:*) export _display=\"\$1\"; :*) export _display=\"\$1\";
shift shift
esac esac
_display=\${_display:-:0} _display=\${_display:-:0}
_display=\${_display#:} _display=\${_display#:}
echo Using :\$_display echo Using :\$_display
if [ -n \"\$DO_X_RESET\" ]; then if [ -n \"\$DO_X_RESET\" ]; then
RESET_OPTION=\"-once\" RESET_OPTION=\"-once\"
else else
RESET_OPTION=\"-noreset\" RESET_OPTION=\"-noreset\"
fi; fi;
XCMD=\"\$(egrep \"^Environment=\" /etc/systemd/system/display-manager.service | sed -e \"s/Environment=/ export /\" | sed -e '\\''s/#.*//'\\'' ; echo export _XARGS_=\\\$\\( grep xserver_arguments \\\$SLIM_CFGFILE \\| sed -e s/xserver_arguments// \\| sed -e s/:0/:\${_display}/ \\| sed -e s/vt7/vt\$((7+_display))/ \\) ; echo ${xorgserver}/bin/X \\\$_XARGS_ \$RESET_OPTION )\" XCMD=\"\$(egrep \"^Environment=\" /etc/systemd/system/display-manager.service | sed -e \"s/Environment=/ export /\" | sed -e '\\''s/#.*//'\\'' ; echo export _XARGS_=\\\$\\( grep xserver_arguments \\\$SLIM_CFGFILE \\| sed -e s/xserver_arguments// \\| sed -e s/:0/:\${_display}/ \\| sed -e s/vt7/vt\$((7+_display))/ \\) ; echo ${xorgserver}/bin/X \\\$_XARGS_ \$RESET_OPTION )\"
PRE_XCMD=\"\$(egrep \"^ExecStartPre=\" /etc/systemd/system/display-manager.service | sed -e \"\s/ExecStartPre=//\")\" PRE_XCMD=\"\$(egrep \"^ExecStartPre=\" /etc/systemd/system/display-manager.service | sed -e \"\s/ExecStartPre=//\")\"
echo \"\$PRE_XCMD\" echo \"\$PRE_XCMD\"
echo \"\$PRE_XCMD\" | bash echo \"\$PRE_XCMD\" | bash
echo \"\$XCMD\" echo \"\$XCMD\"
echo \"\$XCMD\" | bash & echo \"\$XCMD\" | bash &
while ! test -e /tmp/.X11-unix/X\$_display &>/dev/null ; do sleep 0.5; done while ! test -e /tmp/.X11-unix/X\$_display &>/dev/null ; do sleep 0.5; done
su -l \${USER:-identityless-shelter} -c \"DISPLAY=:\$_display \$*\"; su -l \${USER:-identityless-shelter} -c \"DISPLAY=:\$_display \$*\";
' >\$out/libexec/xlaunch ' >\$out/libexec/xlaunch
chmod a+x \$out/libexec/xlaunch chmod a+x \$out/libexec/xlaunch
"; ";
meta = {
description = ''Wrapper to parse NixOS-specific X environment and launch a custom X session'';
maintainers = [ stdenv.lib.maintainers.raskin ];
};
} }

View File

@ -22,5 +22,6 @@ stdenv.mkDerivation rec {
description = "A port of the 7-zip archiver"; description = "A port of the 7-zip archiver";
# license = stdenv.lib.licenses.lgpl21Plus; + "unRAR restriction" # license = stdenv.lib.licenses.lgpl21Plus; + "unRAR restriction"
platforms = stdenv.lib.platforms.unix; platforms = stdenv.lib.platforms.unix;
maintainers = [ stdenv.lib.maintainers.raskin ];
}; };
} }

View File

@ -13,7 +13,7 @@ stdenv.mkDerivation rec {
meta = { meta = {
description = "A GTK+ front-end for command line archiving tools"; description = "A GTK+ front-end for command line archiving tools";
mainatainers = [ stdenv.lib.maintainers.iElectric ]; maintainers = [ stdenv.lib.maintainers.iElectric ];
license = stdenv.lib.licenses.gpl2; license = stdenv.lib.licenses.gpl2;
platforms = stdenv.lib.platforms.all; platforms = stdenv.lib.platforms.all;
}; };