*: add config

This commit is contained in:
steveej 2015-10-23 01:26:53 +02:00
commit 80c42c7e45
22 changed files with 3229 additions and 0 deletions

89
derivations/dev/cross.nix Normal file
View file

@ -0,0 +1,89 @@
import /home/steveej/src/github/NixOS/nixpkgs/default.nix {
crossSystem = rec {
config = "armv7l-unknown-linux-gnueabi";
bigEndian = false;
arch = "arm";
float = "hard";
fpu = "vfpv3-d16";
withTLS = true;
libc = "glibc";
platform = {
name = "armv7l-hf-multiplatform";
gcc = {
arch = "armv7-a";
fpu = "neon";
float = "hard";
};
kernelMajor = "2.6"; # Using "2.6" enables 2.6 kernel syscalls in glibc.
kernelHeadersBaseConfig = "multi_v7_defconfig";
kernelBaseConfig = "multi_v7_defconfig";
kernelArch = "arm";
kernelDTB = true;
kernelAutoModules = false;
kernelExtraConfig = ''
NAMESPACES y
BTRFS_FS y
BTRFS_FS_POSIX_ACL y
OVERLAY_FS y
FUSE_FS y
'';
kernelTarget = "zImage";
uboot = null;
};
openssl.system = "linux-generic32";
gcc = {
arch = "armv7-a";
fpu = "neon";
float = "hard";
};
};
}
# pkgs.config = {
# packageOverrides = super: let self = super.pkgs; in {
# linux_4_0 = super.linux_3_18.override {
# kernelPatches = super.linux_3_18.kernelPatches ++ [
# # we'll also add one of our own patches
# { patch = ./dts.patch; name = "dts-fix"; }
# ];
#
# # add "CONFIG_PPP_FILTER y" option to the set of kernel options
# extraConfig = ''
# HAVE_IMX_ANATOP y
# HAVE_IMX_GPC y
# HAVE_IMX_MMDC y
# HAVE_IMX_SRC y
# SOC_IMX6 y
# SOC_IMX6Q y
# SOC_IMX6SL y
# PCI_IMX6 y
# ARM_IMX6Q_CPUFREQ y
# IMX_WEIM y
# AHCI_IMX y
# SERIAL_IMX y
# SERIAL_IMX_CONSOLE y
# I2C_IMX y
# SPI_IMX y
# PINCTRL_IMX y
# PINCTRL_IMX6Q y
# PINCTRL_IMX6SL y
# POWER_RESET_IMX y
# IMX_THERMAL y
# IMX2_WDT y
# IMX_IPUV3_CORE y
# DRM_IMX y
# DRM_IMX_FB_HELPER y
# DRM_IMX_PARALLEL_DISPLAY y
# DRM_IMX_TVE y
# DRM_IMX_LDB y
# DRM_IMX_IPUV3 y
# DRM_IMX_HDMI y
# MMC_SDHCI_ESDHC_IMX y
# IMX_SDMA y
# PWM_IMX y
# DEBUG_IMX6Q_UART y
#
# PPP_FILTER y
# '';
# };
# };
# };

39
derivations/dev/go.nix Normal file
View file

@ -0,0 +1,39 @@
{
pkgs ? import /home/steveej/src/github/NixOS/nixpkgs-systemsource {},
name ? "generic",
version,
extraBuildInputs ? [] }:
let
goPackages = builtins.getAttr "go${version}Packages" pkgs;
goBuildInputs = { goPackages }: [
goPackages.go
goPackages.tools
goPackages.tools.bin
goPackages.gocode
goPackages.gocode.bin
goPackages.godef
goPackages.godef.bin
goPackages.godep
goPackages.godep.bin
goPackages.gox.bin
];
goShellHook = { goPackages, name }: ''
goname=${goPackages.go.version}_$name
export GOROOT=${goPackages.go}/share/go
export GOPATH="$HOME/.gopath_$goname"
export PATH="$HOME/.gopath_$goname/bin:$PATH"
unset name
'';
in pkgs.stdenv.mkDerivation {
inherit name;
buildInputs = extraBuildInputs ++ (goBuildInputs){ inherit goPackages; };
shellHook = (goShellHook) { inherit name; inherit goPackages; };
# go14Env = mkGoEnv {
# inherit name;
# goPackages=pkgs.go14Packages;
# };
# go15 = mkGoEnv {
# inherit name;
# goPackages=pkgs.go15Packages;
# };
}

43
derivations/dev/rkt.nix Normal file
View file

@ -0,0 +1,43 @@
{
pkgs ? import /home/steveej/src/github/NixOS/nixpkgs-systemsource {},
mkGoEnv ? import ./go.nix,
}:
let
rktBasebuildInputs = with pkgs; [
autoconf
automake
autogen
gnupg1
squashfsTools
cpio
tree
intltool
libtool
pkgconfig
libgcrypt
gperf
libcap
libseccomp
libzip
eject
iptables
bc
acl
];
in {
go15 = mkGoEnv {
inherit pkgs;
name = "rktGo15";
version = "15";
extraBuildInputs = rktBasebuildInputs;
};
go16 = mkGoEnv {
inherit pkgs;
name = "rktGo16";
version = "16";
extraBuildInputs = rktBasebuildInputs;
};
}

View file

@ -0,0 +1,29 @@
with import <nixpkgs> {};
stdenv.mkDerivation rec {
name = "nomad";
version = "0.1.2";
filename = "nomad_${version}_linux_amd64.zip";
src = fetchurl {
url = "https://releases.hashicorp.com/nomad/${version}/${filename}";
sha256 = "0d3r3n1wwlic1kg3hgghds7f3b0qhh97v8xf36mcmsnmn2ngfd9k";
};
unpackPhase = ''
unzip ${src}
'';
buildInputs = [ makeWrapper unzip ];
libPath = lib.makeLibraryPath [ ];
installPhase = ''
patchelf --set-interpreter ${stdenv.glibc}/lib/ld-linux-x86-64.so.2 ./nomad
mkdir -p $out/bin
cp ./nomad $out/bin/nomad
# wrapProgram $out/bin/nomad \
# --prefix LD_LIBRARY_PATH : "${libPath}"
#
'';
}