Update utilities and package repository list

master
Sven Slootweg 6 years ago
parent 9d3309c6be
commit c57f3ecfab

@ -0,0 +1,7 @@
{ stdenv, pkgs, ... }:
{ path, storeHash, ... }:
let
derivationName = baseNameOf path;
storePath = "/nix/store/${storeHash}-${derivationName}";
in
if builtins.pathExists storePath then storePath else path

@ -0,0 +1,37 @@
# Source: http://chriswarbo.net/projects/nixos/useful_hacks.html
{ args, name }:
let
nixpkgs = import <nixpkgs> {};
lib = nixpkgs.lib;
in
rec {
# Store each arg in a separate variable, named numerically
env = with lib.foldl' (result: arg: {
# Increment the count, for the next arg (if any)
count = result.count + 1;
# Append a variable to the environment for this arg
vars = result.vars // {
"${name}${toString result.count}" = arg;
};
})
# Start with variable 1 in an empty environment
{ count = 1; vars = {}; }
args;
vars;
code = ''
### Auto-generated by nixListToBashArray
${name}=()
for N in $(seq 1 "${toString (lib.length args)}")
do
# Use a "variable variable" to look up "$name$N" as a variable name
NIXLISTTOBASHARRAYTEMP="${name}$N"
${name}=("''${${name}[@]}" "''${!NIXLISTTOBASHARRAYTEMP}")
unset NIXLISTTOBASHARRAYTEMP
done
### End of auto-generated code
'';
}

@ -2,6 +2,7 @@ options: let
combinedOptions = options // { combinedOptions = options // {
overlays = [ overlays = [
(import ../nixpkgs-mozilla/rust-overlay.nix) (import ../nixpkgs-mozilla/rust-overlay.nix)
(import (fetchTarball https://git.cryto.net/joepie91/morepkgs/archive/master.tar.gz))
(self: super: { (self: super: {
jre8Plugin = super.jre8Plugin.overrideAttrs (drv: { jre8Plugin = super.jre8Plugin.overrideAttrs (drv: {
src = ../sources/jdk-8u141-linux-x64.tar.gz; src = ../sources/jdk-8u141-linux-x64.tar.gz;
@ -11,7 +12,9 @@ options: let
}; };
in { in {
master = (import (fetchTarball https://github.com/NixOS/nixpkgs/archive/master.tar.gz) combinedOptions); master = (import (fetchTarball https://github.com/NixOS/nixpkgs/archive/master.tar.gz) combinedOptions);
unstable = (import (fetchTarball https://github.com/NixOS/nixpkgs-channels/archive/nixos-unstable.tar.gz) combinedOptions); /* unstable = (import (fetchTarball https://github.com/NixOS/nixpkgs-channels/archive/nixos-unstable.tar.gz) combinedOptions); */
unstable = (import (fetchTarball https://github.com/NixOS/nixpkgs-channels/archive/e05a926713441a4ec632c7b793448654f7c2056d.tar.gz) combinedOptions);
/* unstable = (import <nixpkgs>) combinedOptions; */
nixpkgs = (import <nixpkgs>) combinedOptions; nixpkgs = (import <nixpkgs>) combinedOptions;
myNixpkgs = (import ../packages) {}; myNixpkgs = (import ../packages) {};
} }

Loading…
Cancel
Save