Explorar el Código

Update nix setup, lets use nix.

cray
Mitch Tishmack hace 10 años
padre
commit
9f04b548ce
Se han modificado 2 ficheros con 80 adiciones y 16 borrados
  1. +55
    -5
      nix/.nixpkgs/config.nix
  2. +25
    -11
      nix/.profile.d/99-final-nix.sh

+ 55
- 5
nix/.nixpkgs/config.nix Ver fichero

@@ -1,12 +1,62 @@
{
packageOverrides = super: let self = super.pkgs; in {
{ pkgs }: {
packageOverrides = pkgs_: with pkgs_; {
default = with pkgs; buildEnv {
name = "default";
paths = [
ansible
ack
aria
iperf
curl
clang
git
gist
mercurial
docbook5
entr
emacs
gnupg1
gnutar
gnumake
sloccount
cloc
less
multitail
rlwrap
gdbm
mosh
htop
keychain
silver-searcher
aspell
aspellDicts.en
openssl
pigz
xz
pv
postgresql
python27Packages.youtube-dl
readline
rsync
sqlite
texLiveFull
tmux
tree
wget
wakelan
unzip
zip
upx
];
};
myHaskellEnv = myHaskellEnv =
self.haskell.packages.ghc7102.ghcWithPackages
pkgs_.haskell.packages.ghc7102.ghcWithPackages
(haskellPackages: with haskellPackages; [ (haskellPackages: with haskellPackages; [
aeson aeson
arrows arrows
async async
bake bake
cabal-dependency-licenses
cabal-install cabal-install
case-insensitive case-insensitive
ghc-mod ghc-mod
@@ -17,12 +67,12 @@
pandoc pandoc
shake shake
ShellCheck ShellCheck
Spock
stack stack
stylish-haskell stylish-haskell
regex-posix
wreq wreq
] ]
); );
}; };
allowUnfree = true;
allowBroken = true;
} }

+ 25
- 11
nix/.profile.d/99-final-nix.sh Ver fichero

@@ -1,11 +1,25 @@
# nix.profile.d/99-final-nix.sh

# The nix installer put something like this into the .profile.
# BAD INSTALLER NO COOKIE!
if [ -e ${HOME}/.nix-profile/etc/profile.d/nix.sh ]; then
. ${HOME}/.nix-profile/etc/profile.d/nix.sh;
export NIX_PATH=${HOME}/src/github.com/NixOS/nixpkgs:nixpkgs=${HOME}/src/github.com/NixOS/nixpkgs
export NIX_CFLAGS_COMPILE="-idirafter /usr/include"
export NIX_CFLAGS_LINK="-L/usr/lib"
nix_env_setup
fi
# nix/profile.d/99-final-nix.sh

nix_env_setup()
{
# The nix installer put something like this into the .profile.
# BAD INSTALLER NO COOKIE!
if [ -e ${HOME}/.nix-profile/etc/profile.d/nix.sh ]; then
. ${HOME}/.nix-profile/etc/profile.d/nix.sh;
export NIX_PATH=${HOME}/src/github.com/NixOS/nixpkgs:nixpkgs=${HOME}/src/github.com/NixOS/nixpkgs
export NIX_CFLAGS_COMPILE="-idirafter /usr/include"
export NIX_CFLAGS_LINK="-L/usr/lib"

NIX_GHC=$(type -p ghc > /dev/null 2>&1)
if [ -n "$NIX_GHC" ]; then
eval $(grep export "$NIX_GHC")
fi
fi

nr()
{
nix-shell --run "$(echo $@)"
}
}

nix_env_setup

Cargando…
Cancelar
Guardar