This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ pkgs ? import <nixpkgs> {} }: | |
with pkgs; | |
let | |
redis_3_0_7 = pkgs.redis.overrideDerivation (attrs: rec { | |
version = "3.0.7"; | |
name = "redis-${version}"; | |
src = fetchurl { | |
url = "http://download.redis.io/releases/${name}.tar.gz"; | |
sha256 = "08vzfdr67gp3lvk770qpax2c5g2sx8hn6p64jn3jddrvxb2939xj"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ pkgs ? import <nixpkgs> {} }: | |
with pkgs; | |
let | |
redis_3_0_7 = pkgs.redis.overrideDerivation (attrs: rec { | |
version = "3.0.7"; | |
name = "redis-${version}"; | |
src = fetchurl { | |
url = "http://download.redis.io/releases/${name}.tar.gz"; | |
sha256 = "08vzfdr67gp3lvk770qpax2c5g2sx8hn6p64jn3jddrvxb2939xj"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ pkgs ? import <nixpkgs> {} }: | |
with pkgs; | |
let | |
redis = pkgs.redis.overrideDerivation (attrs: rec { | |
name = "redis-2.8.23"; | |
src = fetchurl { | |
url = "http://download.redis.io/releases/${name}.tar.gz"; | |
sha256 = "1kjsx79jhhssh5k9v17s9mifaclkl6mfsrsv0cvi583qyiw9gizk"; | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ pkgs ? import <nixpkgs> {} }: | |
with pkgs; | |
dockerTools.buildImage { | |
name = "redis"; | |
runAsRoot = '' | |
#!${stdenv.shell} | |
${dockerTools.shadowSetup} | |
groupadd -r redis | |
useradd -r -g redis -d /data -M redis |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ pkgs ? import <nixpkgs> {} }: | |
with pkgs; | |
let | |
entrypoint = writeScript "entrypoint.sh" '' | |
#!${stdenv.shell} | |
set -e | |
# allow the container to be started with `--user` | |
if [ "$1" = "redis-server" -a "$(${coreutils}/bin/id -u)" = "0" ]; then |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ pkgs ? import <nixpkgs> {} }: | |
with pkgs; | |
dockerTools.buildImage { | |
name = "redis"; | |
runAsRoot = '' | |
#!${stdenv.shell} | |
${dockerTools.shadowSetup} | |
groupadd -r redis | |
useradd -r -g redis -d /data -M redis |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
/* | |
#include <openssl/md5.h> | |
*/ | |
import "C" | |
import ( | |
"errors" | |
"unsafe" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ nixpkgs }: | |
let | |
release = import "${nixpkgs}/pkgs/top-level/release.nix" { inherit nixpkgs; supportedSystems = [ "x86_64-linux" ]; }; | |
in | |
{ | |
inherit (release) file; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ supportedSystems ? [ "x86_64-linux" "i686-linux" ] }: | |
import <nixpkgs/nixos/release-combined.nix> { inherit supportedSystems; } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pkgs: attrs: | |
with pkgs; | |
let defaultAttrs = { | |
builder = "${bash}/bin/bash"; | |
args = [ ./builder.sh ]; | |
setup = ./setup.sh; | |
baseInputs = [ gnutar gzip gnumake gcc binutils coreutils gawk gnused gnugrep patchelf findutils ]; | |
buildInputs = []; | |
system = builtins.currentSystem; | |
}; |
NewerOlder