Skip to content

Instantly share code, notes, and snippets.

Luca Bruno lethalman

Block or report user

Report or block lethalman

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View redis-generic-debian.nix
{ 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";
View redis-generic.nix
{ 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";
View redis-2.8.23.nix
{ 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";
};
View redis-small.nix
{ 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
View redis.nix
{ 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
View docker-redis.nix
{ 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
@lethalman
lethalman / md5.go
Created Jan 23, 2015
Incremental golang md5
View md5.go
package main
/*
#include <openssl/md5.h>
*/
import "C"
import (
"errors"
"unsafe"
View fpie.nix
{ nixpkgs }:
let
release = import "${nixpkgs}/pkgs/top-level/release.nix" { inherit nixpkgs; supportedSystems = [ "x86_64-linux" ]; };
in
{
inherit (release) file;
}
View release-combined.nix
{ supportedSystems ? [ "x86_64-linux" "i686-linux" ] }:
import <nixpkgs/nixos/release-combined.nix> { inherit supportedSystems; }
View autotools.nix
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;
};
You can’t perform that action at this time.