Merge remote-tracking branch 'central/master' into viric_clean

This commit is contained in:
Lluís Batlle i Rossell 2018-07-28 19:25:14 +02:00
commit f54b387b63
292 changed files with 11331 additions and 3672 deletions

10
.github/CODEOWNERS vendored
View file

@ -52,11 +52,11 @@
/doc/languages-frameworks/python.md @FRidh
# Haskell
/pkgs/development/compilers/ghc @peti @ryantm
/pkgs/development/haskell-modules @peti @ryantm
/pkgs/development/haskell-modules/default.nix @peti @ryantm
/pkgs/development/haskell-modules/generic-builder.nix @peti @ryantm
/pkgs/development/haskell-modules/hoogle.nix @peti @ryantm
/pkgs/development/compilers/ghc @peti @ryantm @basvandijk
/pkgs/development/haskell-modules @peti @ryantm @basvandijk
/pkgs/development/haskell-modules/default.nix @peti @ryantm @basvandijk
/pkgs/development/haskell-modules/generic-builder.nix @peti @ryantm @basvandijk
/pkgs/development/haskell-modules/hoogle.nix @peti @ryantm @basvandijk
# R
/pkgs/applications/science/math/R @peti

View file

@ -649,6 +649,8 @@ merge:"diff3"
imageDigest = "sha256:20d9485b25ecfd89204e843a962c1bd70e9cc6858d65d7f5fadc340246e2116b"; <co xml:id='ex-dockerTools-pullImage-2' />
finalImageTag = "1.11"; <co xml:id='ex-dockerTools-pullImage-3' />
sha256 = "0mqjy3zq2v6rrhizgb9nvhczl87lcfphq9601wcprdika2jz7qh8"; <co xml:id='ex-dockerTools-pullImage-4' />
os = "linux"; <co xml:id='ex-dockerTools-pullImage-5' />
arch = "x86_64"; <co xml:id='ex-dockerTools-pullImage-6' />
}
</programlisting>
</example>
@ -664,9 +666,15 @@ merge:"diff3"
<callout arearefs='ex-dockerTools-pullImage-2'>
<para>
<varname>imageDigest</varname> specifies the digest of the image to be
downloaded. Skopeo can be used to get the digest of an image
downloaded. Skopeo can be used to get the digest of an image, with its
<varname>inspect</varname> subcommand. Since a given <varname>imageName</varname>
may transparently refer to a manifest list of images which support
multiple architectures and/or operating systems, supply the `--override-os`
and `--override-arch` arguments to specify exactly which image you
want. By default it will match the OS and architecture of the host the
command is run on.
<programlisting>
$ skopeo inspect docker://docker.io/nixos/nix:1.11 | jq -r '.Digest'
$ nix-shell --packages skopeo jq --command "skopeo --override-os linux --override-arch x86_64 inspect docker://docker.io/nixos/nix:1.11 | jq -r '.Digest'"
sha256:20d9485b25ecfd89204e843a962c1bd70e9cc6858d65d7f5fadc340246e2116b
</programlisting>
This argument is required.
@ -686,6 +694,18 @@ merge:"diff3"
This argument is required.
</para>
</callout>
<callout arearefs='ex-dockerTools-pullImage-5'>
<para>
<varname>os</varname>, if specified, is the operating system of the fetched image.
By default it's <literal>linux</literal>.
</para>
</callout>
<callout arearefs='ex-dockerTools-pullImage-6'>
<para>
<varname>arch</varname>, if specified, is the cpu architecture of the fetched image.
By default it's <literal>x86_64</literal>.
</para>
</callout>
</calloutlist>
</section>

View file

@ -424,7 +424,7 @@ available.
At some point you'll likely have multiple packages which you would
like to be able to use in different projects. In order to minimise unnecessary
duplication we now look at how you can maintain yourself a repository with your
duplication we now look at how you can maintain a repository with your
own packages. The important functions here are `import` and `callPackage`.
### Including a derivation using `callPackage`
@ -647,7 +647,7 @@ in python.withPackages(ps: [ps.blaze])).env
The `buildPythonApplication` function is practically the same as `buildPythonPackage`.
The difference is that `buildPythonPackage` by default prefixes the names of the packages with the version of the interpreter.
Because with an application we're not interested in multiple version the prefix is dropped.
Because this is irrelevant for applications, the prefix is omitted.
#### `toPythonApplication` function
@ -1006,14 +1006,14 @@ folder and not downloaded again.
If you need to change a package's attribute(s) from `configuration.nix` you could do:
```nix
nixpkgs.config.packageOverrides = superP: {
pythonPackages = superP.pythonPackages.override {
overrides = self: super: {
bepasty-server = super.bepasty-server.overrideAttrs ( oldAttrs: {
src = pkgs.fetchgit {
url = "https://github.com/bepasty/bepasty-server";
sha256 = "9ziqshmsf0rjvdhhca55sm0x8jz76fsf2q4rwh4m6lpcf8wr0nps";
rev = "e2516e8cf4f2afb5185337073607eb9e84a61d2d";
nixpkgs.config.packageOverrides = super: {
python = super.python.override {
packageOverrides = python-self: python-super: {
zerobin = python-super.zerobin.overrideAttrs (oldAttrs: {
src = super.fetchgit {
url = "https://github.com/sametmax/0bin";
rev = "a344dbb18fe7a855d0742b9a1cede7ce423b34ec";
sha256 = "16d769kmnrpbdr0ph0whyf4yff5df6zi4kmwx7sz1d3r6c8p6xji";
};
});
};
@ -1021,27 +1021,39 @@ If you need to change a package's attribute(s) from `configuration.nix` you coul
};
```
If you are using the `bepasty-server` package somewhere, for example in `systemPackages` or indirectly from `services.bepasty`, then a `nixos-rebuild switch` will rebuild the system but with the `bepasty-server` package using a different `src` attribute. This way one can modify `python` based software/libraries easily. Using `self` and `super` one can also alter dependencies (`buildInputs`) between the old state (`self`) and new state (`super`).
`pythonPackages.zerobin` is now globally overridden. All packages and also the
`zerobin` NixOS service use the new definition.
Note that `python-super` refers to the old package set and `python-self`
to the new, overridden version.
To modify only a Python package set instead of a whole Python derivation, use this snippet:
```nix
myPythonPackages = pythonPackages.override {
overrides = self: super: {
zerobin = ...;
};
}
```
### How to override a Python package using overlays?
To alter a python package using overlays, you would use the following approach:
Use the following overlay template:
```nix
self: super:
{
python = super.python.override {
packageOverrides = python-self: python-super: {
bepasty-server = python-super.bepasty-server.overrideAttrs ( oldAttrs: {
src = self.pkgs.fetchgit {
url = "https://github.com/bepasty/bepasty-server";
sha256 = "9ziqshmsf0rjvdhhca55sm0x8jz76fsf2q4rwh4m6lpcf8wr0nps";
rev = "e2516e8cf4f2afb5185337073607eb9e84a61d2d";
zerobin = python-super.zerobin.overrideAttrs (oldAttrs: {
src = super.fetchgit {
url = "https://github.com/sametmax/0bin";
rev = "a344dbb18fe7a855d0742b9a1cede7ce423b34ec";
sha256 = "16d769kmnrpbdr0ph0whyf4yff5df6zi4kmwx7sz1d3r6c8p6xji";
};
});
};
};
pythonPackages = self.python.pkgs;
}
```

View file

@ -689,7 +689,7 @@ overrides = super: self: rec {
plugins = with availablePlugins; [
(python.withPackages (ps: with ps; [ pycrypto python-dbus ]))
];
}
};
}
</programlisting>
</para>

View file

@ -231,6 +231,12 @@ lib.mapAttrs (n: v: v // { shortName = n; }) rec {
fullName = "Eiffel Forum License v2.0";
};
elastic = {
fullName = "ELASTIC LICENSE";
url = https://github.com/elastic/elasticsearch/blob/master/licenses/ELASTIC-LICENSE.txt;
free = false;
};
epl10 = spdx {
spdxId = "EPL-1.0";
fullName = "Eclipse Public License 1.0";

View file

@ -16,6 +16,7 @@ rec {
isAarch64 = { cpu = { family = "arm"; bits = 64; }; };
isMips = { cpu = { family = "mips"; }; };
isRiscV = { cpu = { family = "riscv"; }; };
isSparc = { cpu = { family = "sparc"; }; };
isWasm = { cpu = { family = "wasm"; }; };
is32bit = { cpu = { bits = 32; }; };

View file

@ -93,6 +93,9 @@ rec {
riscv32 = { bits = 32; significantByte = littleEndian; family = "riscv"; };
riscv64 = { bits = 64; significantByte = littleEndian; family = "riscv"; };
sparc = { bits = 32; significantByte = bigEndian; family = "sparc"; };
sparc64 = { bits = 64; significantByte = bigEndian; family = "sparc"; };
wasm32 = { bits = 32; significantByte = littleEndian; family = "wasm"; };
wasm64 = { bits = 64; significantByte = littleEndian; family = "wasm"; };
};

View file

@ -1,43 +1,9 @@
{ lib }:
let
zipIntBits = f: x: y:
let
# (intToBits 6) -> [ 0 1 1 ]
intToBits = x:
if x == 0 || x == -1 then
[]
else
let
headbit = if (x / 2) * 2 != x then 1 else 0; # x & 1
tailbits = if x < 0 then ((x + 1) / 2) - 1 else x / 2; # x >> 1
in
[headbit] ++ (intToBits tailbits);
# (bitsToInt [ 0 1 1 ] 0) -> 6
# (bitsToInt [ 0 1 0 ] 1) -> -6
bitsToInt = l: signum:
if l == [] then
(if signum == 0 then 0 else -1)
else
(builtins.head l) + (2 * (bitsToInt (builtins.tail l) signum));
xsignum = if x < 0 then 1 else 0;
ysignum = if y < 0 then 1 else 0;
zipListsWith' = fst: snd:
if fst==[] && snd==[] then
[]
else if fst==[] then
[(f xsignum (builtins.head snd))] ++ (zipListsWith' [] (builtins.tail snd))
else if snd==[] then
[(f (builtins.head fst) ysignum )] ++ (zipListsWith' (builtins.tail fst) [] )
else
[(f (builtins.head fst) (builtins.head snd))] ++ (zipListsWith' (builtins.tail fst) (builtins.tail snd));
in
assert (builtins.isInt x) && (builtins.isInt y);
bitsToInt (zipListsWith' (intToBits x) (intToBits y)) (f xsignum ysignum);
in
rec {
## Simple (higher order) functions
/* The identity function
For when you need a function that does nothing.
@ -59,7 +25,7 @@ rec {
## Named versions corresponding to some builtin operators.
/* Concat two strings */
/* Concatenate two lists */
concat = x: y: x ++ y;
/* boolean or */
@ -69,13 +35,19 @@ rec {
and = x: y: x && y;
/* bitwise and */
bitAnd = builtins.bitAnd or zipIntBits (a: b: if a==1 && b==1 then 1 else 0);
bitAnd = builtins.bitAnd
or import ./zip-int-bits.nix
(a: b: if a==1 && b==1 then 1 else 0);
/* bitwise or */
bitOr = builtins.bitOr or zipIntBits (a: b: if a==1 || b==1 then 1 else 0);
bitOr = builtins.bitOr
or import ./zip-int-bits.nix
(a: b: if a==1 || b==1 then 1 else 0);
/* bitwise xor */
bitXor = builtins.bitXor or zipIntBits (a: b: if a!=b then 1 else 0);
bitXor = builtins.bitXor
or import ./zip-int-bits.nix
(a: b: if a!=b then 1 else 0);
/* bitwise not */
bitNot = builtins.sub (-1);
@ -93,10 +65,22 @@ rec {
*/
mergeAttrs = x: y: x // y;
# Flip the order of the arguments of a binary function.
/* Flip the order of the arguments of a binary function.
Example:
flip concat [1] [2]
=> [ 2 1 ]
*/
flip = f: a: b: f b a;
# Apply function if argument is non-null
/* Apply function if argument is non-null.
Example:
mapNullable (x: x+1) null
=> null
mapNullable (x: x+1) 22
=> 23
*/
mapNullable = f: a: if isNull a then a else f a;
# Pull in some builtins not included elsewhere.
@ -105,20 +89,30 @@ rec {
isInt isFloat add sub lessThan
seq deepSeq genericClosure;
inherit (lib.strings) fileContents;
release = fileContents ../.version;
versionSuffix = let suffixFile = ../.version-suffix; in
if pathExists suffixFile then fileContents suffixFile else "pre-git";
## nixpks version strings
# Return the Nixpkgs version number.
# The current full nixpkgs version number.
version = release + versionSuffix;
# The current nixpkgs version number as string.
release = lib.strings.fileContents ../.version;
# The current nixpkgs version suffix as string.
versionSuffix =
let suffixFile = ../.version-suffix;
in if pathExists suffixFile
then lib.strings.fileContents suffixFile
else "pre-git";
nixpkgsVersion = builtins.trace "`lib.nixpkgsVersion` is deprecated, use `lib.version` instead!" version;
# Whether we're being called by nix-shell.
inNixShell = builtins.getEnv "IN_NIX_SHELL" != "";
## Integer operations
# Return minimum/maximum of two numbers.
min = x: y: if x < y then x else y;
max = x: y: if x > y then x else y;
@ -133,6 +127,9 @@ rec {
*/
mod = base: int: base - (int * (builtins.div base int));
## Comparisons
/* C-style comparisons
a < b, compare a b => -1
@ -162,17 +159,20 @@ rec {
cmp "fooa" "a" => -1
# while
compare "fooa" "a" => 1
*/
splitByAndCompare = p: yes: no: a: b:
if p a
then if p b then yes a b else -1
else if p b then 1 else no a b;
/* Reads a JSON file. */
importJSON = path:
builtins.fromJSON (builtins.readFile path);
## Warnings and asserts
/* See https://github.com/NixOS/nix/issues/749. Eventually we'd like these
to expand to Nix builtins that carry metadata so that Nix can filter out
the INFO messages without parsing the message string.
@ -188,28 +188,36 @@ rec {
warn = msg: builtins.trace "WARNING: ${msg}";
info = msg: builtins.trace "INFO: ${msg}";
# | Add metadata about expected function arguments to a function.
# The metadata should match the format given by
# builtins.functionArgs, i.e. a set from expected argument to a bool
# representing whether that argument has a default or not.
# setFunctionArgs : (a → b) → Map String Bool → (a → b)
#
# This function is necessary because you can't dynamically create a
# function of the { a, b ? foo, ... }: format, but some facilities
# like callPackage expect to be able to query expected arguments.
## Function annotations
/* Add metadata about expected function arguments to a function.
The metadata should match the format given by
builtins.functionArgs, i.e. a set from expected argument to a bool
representing whether that argument has a default or not.
setFunctionArgs : (a b) Map String Bool (a b)
This function is necessary because you can't dynamically create a
function of the { a, b ? foo, ... }: format, but some facilities
like callPackage expect to be able to query expected arguments.
*/
setFunctionArgs = f: args:
{ # TODO: Should we add call-time "type" checking like built in?
__functor = self: f;
__functionArgs = args;
};
# | Extract the expected function arguments from a function.
# This works both with nix-native { a, b ? foo, ... }: style
# functions and functions with args set with 'setFunctionArgs'. It
# has the same return type and semantics as builtins.functionArgs.
# setFunctionArgs : (a → b) → Map String Bool.
/* Extract the expected function arguments from a function.
This works both with nix-native { a, b ? foo, ... }: style
functions and functions with args set with 'setFunctionArgs'. It
has the same return type and semantics as builtins.functionArgs.
setFunctionArgs : (a b) Map String Bool.
*/
functionArgs = f: f.__functionArgs or (builtins.functionArgs f);
/* Check whether something is a function or something
annotated with function args.
*/
isFunction = f: builtins.isFunction f ||
(f ? __functor && isFunction (f.__functor f));
}

39
lib/zip-int-bits.nix Normal file
View file

@ -0,0 +1,39 @@
/* Helper function to implement a fallback for the bit operators
`bitAnd`, `bitOr` and `bitXOr` on older nix version.
See ./trivial.nix
*/
f: x: y:
let
# (intToBits 6) -> [ 0 1 1 ]
intToBits = x:
if x == 0 || x == -1 then
[]
else
let
headbit = if (x / 2) * 2 != x then 1 else 0; # x & 1
tailbits = if x < 0 then ((x + 1) / 2) - 1 else x / 2; # x >> 1
in
[headbit] ++ (intToBits tailbits);
# (bitsToInt [ 0 1 1 ] 0) -> 6
# (bitsToInt [ 0 1 0 ] 1) -> -6
bitsToInt = l: signum:
if l == [] then
(if signum == 0 then 0 else -1)
else
(builtins.head l) + (2 * (bitsToInt (builtins.tail l) signum));
xsignum = if x < 0 then 1 else 0;
ysignum = if y < 0 then 1 else 0;
zipListsWith' = fst: snd:
if fst==[] && snd==[] then
[]
else if fst==[] then
[(f xsignum (builtins.head snd))] ++ (zipListsWith' [] (builtins.tail snd))
else if snd==[] then
[(f (builtins.head fst) ysignum )] ++ (zipListsWith' (builtins.tail fst) [] )
else
[(f (builtins.head fst) (builtins.head snd))] ++ (zipListsWith' (builtins.tail fst) (builtins.tail snd));
in
assert (builtins.isInt x) && (builtins.isInt y);
bitsToInt (zipListsWith' (intToBits x) (intToBits y)) (f xsignum ysignum)

View file

@ -589,6 +589,11 @@
github = "c0bw3b";
name = "Renaud";
};
c0deaddict = {
email = "josvanbakel@protonmail.com";
github = "c0deaddict";
name = "Jos van Bakel";
};
c0dehero = {
email = "codehero@nerdpol.ch";
name = "CodeHero";
@ -862,6 +867,11 @@
github = "danharaj";
name = "Dan Haraj";
};
danieldk = {
email = "me@danieldk.eu";
github = "danieldk";
name = "Daniël de Kok";
};
danielfullmer = {
email = "danielrf12@gmail.com";
github = "danielfullmer";
@ -1372,6 +1382,11 @@
github = "froozen";
name = "fro_ozen";
};
frontsideair = {
email = "photonia@gmail.com";
github = "frontsideair";
name = "Fatih Altinok";
};
ftrvxmtrx = {
email = "ftrvxmtrx@gmail.com";
github = "ftrvxmtrx";
@ -2002,6 +2017,13 @@
email = "tierpluspluslists@gmail.com";
name = "Karn Kallio";
};
kmeakin = {
email = "karlwfmeakin@gmail.com";
name = "Karl Meakin";
github = "Kmeakin";
};
knedlsepp = {
email = "josef.kemetmueller@gmail.com";
github = "knedlsepp";
@ -2720,6 +2742,11 @@
github = "neeasade";
name = "Nathan Isom";
};
neonfuz = {
email = "neonfuz@gmail.com";
github = "neonfuz";
name = "Sage Raflik";
};
nequissimus = {
email = "tim@nequissimus.com";
github = "nequissimus";

View file

@ -70,7 +70,7 @@
<listitem>
<para>
<link xlink:href="https://github.com/NixOS/nixpkgs/compare/bdf161ed8d21...6b63c4616790">
Bump the <literal>system.nixos.defaultChannel</literal> attribute in
Bump the <literal>system.defaultChannel</literal> attribute in
<literal>nixos/modules/misc/version.nix</literal> </link>
</para>
</listitem>

View file

@ -433,9 +433,9 @@ system.autoUpgrade.enable = true;
default. If you have existing systems with such host keys and want to
continue to use them, please set
<programlisting>
system.nixos.stateVersion = "14.12";
system.stateVersion = "14.12";
</programlisting>
The new option <option>system.nixos.stateVersion</option> ensures that
The new option <option>system.stateVersion</option> ensures that
certain configuration changes that could break existing systems (such as
the <command>sshd</command> host key setting) will maintain compatibility
with the specified NixOS release. NixOps sets the state version of

View file

@ -362,6 +362,15 @@ inherit (pkgs.nixos {
The module <option>services.networking.hostapd</option> now uses WPA2 by default.
</para>
</listitem>
<listitem>
<para>
<varname>s6Dns</varname>, <varname>s6Networking</varname>,
<varname>s6LinuxUtils</varname> and <varname>s6PortableUtils</varname>
renamed to
<varname>s6-dns</varname>, <varname>s6-networking</varname>,
<varname>s6-linux-utils</varname> and <varname>s6-portable-utils</varname> respectively.
</para>
</listitem>
</itemizedlist>
</section>
</section>

View file

@ -10,7 +10,7 @@ version=$(nix-instantiate --eval --strict '<nixpkgs>' -A lib.version | sed s/'"'
major=${version:0:5}
echo "NixOS version is $version ($major)"
stateDir=/var/tmp/ec2-image-$version
stateDir=/home/deploy/amis/ec2-image-$version
echo "keeping state in $stateDir"
mkdir -p $stateDir
@ -161,6 +161,7 @@ for type in $types; do
# Create a snapshot.
if [ -z "$snapId" ]; then
echo "creating snapshot..."
# FIXME: this can fail with InvalidVolume.NotFound. Eventual consistency yay.
snapId=$(aws ec2 create-snapshot --volume-id "$volId" --region "$region" --description "$description" | jq -r .SnapshotId)
if [ "$snapId" = null ]; then exit 1; fi
echo -n "$snapId" > $stateDir/$region.$type.snap-id

View file

@ -9,7 +9,9 @@ let
cfg = config.networking;
dnsmasqResolve = config.services.dnsmasq.enable &&
config.services.dnsmasq.resolveLocalQueries;
hasLocalResolver = config.services.bind.enable || dnsmasqResolve;
hasLocalResolver = config.services.bind.enable ||
config.services.unbound.enable ||
dnsmasqResolve;
resolvconfOptions = cfg.resolvconfOptions
++ optional cfg.dnsSingleRequest "single-request"

View file

@ -144,8 +144,8 @@ in {
package = mkOption {
type = types.package;
default = pulseaudioLight;
defaultText = "pkgs.pulseaudioLight";
default = pkgs.pulseaudio;
defaultText = "pkgs.pulseaudio";
example = literalExample "pkgs.pulseaudioFull";
description = ''
The PulseAudio derivation to use. This can be used to enable

View file

@ -120,8 +120,8 @@ let
shell = mkOption {
type = types.either types.shellPackage types.path;
default = pkgs.nologin;
defaultText = "pkgs.nologin";
default = pkgs.shadow;
defaultText = "pkgs.shadow";
example = literalExample "pkgs.bashInteractive";
description = ''
The path to the user's shell. Can use shell derivations,

View file

@ -32,5 +32,5 @@ with lib;
# Allow the user to log in as root without a password.
users.users.root.initialHashedPassword = "";
system.nixos.stateVersion = mkDefault "18.03";
system.stateVersion = mkDefault "18.03";
}

View file

@ -628,7 +628,7 @@ $bootLoaderConfig
# compatible, in order to avoid breaking some software such as database
# servers. You should change this only after NixOS release notes say you
# should.
system.nixos.stateVersion = "${\(qw(@release@))}"; # Did you read the comment?
system.stateVersion = "${\(qw(@release@))}"; # Did you read the comment?
}
EOF

View file

@ -21,5 +21,5 @@ with lib;
services.xserver.videoDrivers = mkOverride 40 [ "virtualbox" "vmware" "cirrus" "vesa" "modesetting" ];
powerManagement.enable = false;
system.nixos.stateVersion = mkDefault "18.03";
system.stateVersion = mkDefault "18.03";
}

View file

@ -12,29 +12,29 @@ in
{
options.system.nixos = {
options.system = {
version = mkOption {
nixos.version = mkOption {
internal = true;
type = types.str;
description = "The full NixOS version (e.g. <literal>16.03.1160.f2d4ee1</literal>).";
};
release = mkOption {
nixos.release = mkOption {
readOnly = true;
type = types.str;
default = trivial.release;
description = "The NixOS release (e.g. <literal>16.03</literal>).";
};
versionSuffix = mkOption {
nixos.versionSuffix = mkOption {
internal = true;
type = types.str;
default = trivial.versionSuffix;
description = "The NixOS version suffix (e.g. <literal>1160.f2d4ee1</literal>).";
};
revision = mkOption {
nixos.revision = mkOption {
internal = true;
type = types.str;
default = if pathIsDirectory gitRepo then commitIdFromGitRepo gitRepo
@ -43,7 +43,7 @@ in
description = "The Git revision from which this NixOS configuration was built.";
};
codeName = mkOption {
nixos.codeName = mkOption {
readOnly = true;
type = types.str;
description = "The NixOS release code name (e.g. <literal>Emu</literal>).";
@ -76,8 +76,8 @@ in
config = {
warnings = lib.optional (options.system.nixos.stateVersion.highestPrio > 1000)
"You don't have `system.nixos.stateVersion` explicitly set. Expect things to break.";
warnings = lib.optional (options.system.stateVersion.highestPrio > 1000)
"You don't have `system.stateVersion` explicitly set. Expect things to break.";
system.nixos = {
# These defaults are set here rather than up there so that

View file

@ -34,7 +34,7 @@ with lib;
# Subscribe the root user to the NixOS channel by default.
if [ "$USER" = root -a ! -e "$HOME/.nix-channels" ]; then
echo "${config.system.nixos.defaultChannel} nixos" > "$HOME/.nix-channels"
echo "${config.system.defaultChannel} nixos" > "$HOME/.nix-channels"
fi
# Create the per-user garbage collector roots directory.

View file

@ -4,6 +4,11 @@ with lib;
{
imports = [
# !!! These were renamed the other way, but got reverted later.
# !!! Drop these before 18.09 is released.
(mkRenamedOptionModule [ "system" "nixos" "stateVersion" ] [ "system" "stateVersion" ])
(mkRenamedOptionModule [ "system" "nixos" "defaultChannel" ] [ "system" "defaultChannel" ])
(mkRenamedOptionModule [ "dysnomia" ] [ "services" "dysnomia" ])
(mkRenamedOptionModule [ "environment" "x11Packages" ] [ "environment" "systemPackages" ])
(mkRenamedOptionModule [ "environment" "enableBashCompletion" ] [ "programs" "bash" "enableCompletion" ])
@ -222,8 +227,6 @@ with lib;
(mkRenamedOptionModule [ "system" "nixosVersionSuffix" ] [ "system" "nixos" "versionSuffix" ])
(mkRenamedOptionModule [ "system" "nixosRevision" ] [ "system" "nixos" "revision" ])
(mkRenamedOptionModule [ "system" "nixosLabel" ] [ "system" "nixos" "label" ])
(mkRenamedOptionModule [ "system" "stateVersion" ] [ "system" "nixos" "stateVersion" ])
(mkRenamedOptionModule [ "system" "defaultChannel" ] [ "system" "nixos" "defaultChannel" ])
# Users
(mkAliasOptionModule [ "users" "extraUsers" ] [ "users" "users" ])

View file

@ -78,7 +78,7 @@ in
# Allow execution of "/home/root/secret.sh" by user `backup`, `database`
# and the group with GID `1006` without a password.
{ users = [ "backup" ]; groups = [ 1006 ];
{ users = [ "backup" "database" ]; groups = [ 1006 ];
commands = [ { command = "/home/root/secret.sh"; options = [ "SETENV" "NOPASSWD" ]; } ]; }
# Allow all users of group `bar` to run two executables as user `foo`

View file

@ -218,7 +218,7 @@ in
config = mkIf config.services.mysql.enable {
services.mysql.dataDir =
mkDefault (if versionAtLeast config.system.nixos.stateVersion "17.09" then "/var/lib/mysql"
mkDefault (if versionAtLeast config.system.stateVersion "17.09" then "/var/lib/mysql"
else "/var/mysql");
users.users.mysql = {

View file

@ -146,7 +146,7 @@ in
};
superUser = mkOption {
type = types.str;
default= if versionAtLeast config.system.nixos.stateVersion "17.09" then "postgres" else "root";
default= if versionAtLeast config.system.stateVersion "17.09" then "postgres" else "root";
internal = true;
description = ''
NixOS traditionally used 'root' as superuser, most other distros use 'postgres'.
@ -165,14 +165,14 @@ in
services.postgresql.package =
# Note: when changing the default, make it conditional on
# system.nixos.stateVersion to maintain compatibility with existing
# system.stateVersion to maintain compatibility with existing
# systems!
mkDefault (if versionAtLeast config.system.nixos.stateVersion "17.09" then pkgs.postgresql96
else if versionAtLeast config.system.nixos.stateVersion "16.03" then pkgs.postgresql95
mkDefault (if versionAtLeast config.system.stateVersion "17.09" then pkgs.postgresql96
else if versionAtLeast config.system.stateVersion "16.03" then pkgs.postgresql95
else pkgs.postgresql94);
services.postgresql.dataDir =
mkDefault (if versionAtLeast config.system.nixos.stateVersion "17.09" then "/var/lib/postgresql/${config.services.postgresql.package.psqlSchema}"
mkDefault (if versionAtLeast config.system.stateVersion "17.09" then "/var/lib/postgresql/${config.services.postgresql.package.psqlSchema}"
else "/var/db/postgresql");
services.postgresql.authentication = mkAfter

View file

@ -342,7 +342,7 @@ in {
};
database_type = mkOption {
type = types.enum [ "sqlite3" "psycopg2" ];
default = if versionAtLeast config.system.nixos.stateVersion "18.03"
default = if versionAtLeast config.system.stateVersion "18.03"
then "psycopg2"
else "sqlite3";
description = ''

View file

@ -14,7 +14,7 @@ let
(optionalString (cfg.defaultMode == "norouting") "--routing=none")
] ++ cfg.extraFlags);
defaultDataDir = if versionAtLeast config.system.nixos.stateVersion "17.09" then
defaultDataDir = if versionAtLeast config.system.stateVersion "17.09" then
"/var/lib/ipfs" else
"/var/lib/ipfs/.ipfs";

View file

@ -9,7 +9,7 @@ let
confFile = pkgs.writeText "radicale.conf" cfg.config;
# This enables us to default to version 2 while still not breaking configurations of people with version 1
defaultPackage = if versionAtLeast config.system.nixos.stateVersion "17.09" then {
defaultPackage = if versionAtLeast config.system.stateVersion "17.09" then {
pkg = pkgs.radicale2;
text = "pkgs.radicale2";
} else {
@ -35,7 +35,7 @@ in
defaultText = defaultPackage.text;
description = ''
Radicale package to use. This defaults to version 1.x if
<literal>system.nixos.stateVersion &lt; 17.09</literal> and version 2.x
<literal>system.stateVersion &lt; 17.09</literal> and version 2.x
otherwise.
'';
};

View file

@ -25,18 +25,17 @@ let
${cfg.extraConf}
'';
configDir = pkgs.buildEnv {
name = "elasticsearch-config";
paths = [
(pkgs.writeTextDir "elasticsearch.yml" esConfig)
(if es5 then (pkgs.writeTextDir "log4j2.properties" cfg.logging)
else (pkgs.writeTextDir "logging.yml" cfg.logging))
];
postBuild = concatStringsSep "\n" (concatLists [
# Elasticsearch 5.x won't start when the scripts directory does not exist
(optional es5 "${pkgs.coreutils}/bin/mkdir -p $out/scripts")
(optional es6 "ln -s ${cfg.package}/config/jvm.options $out/jvm.options")
]);
configDir = cfg.dataDir + "/config";
elasticsearchYml = pkgs.writeTextFile {
name = "elasticsearch.yml";
text = esConfig;
};
loggingConfigFilename = if es5 then "log4j2.properties" else "logging.yml";
loggingConfigFile = pkgs.writeTextFile {
name = loggingConfigFilename;
text = cfg.logging;
};
esPlugins = pkgs.buildEnv {
@ -193,7 +192,24 @@ in {
ln -sfT ${esPlugins}/plugins ${cfg.dataDir}/plugins
ln -sfT ${cfg.package}/lib ${cfg.dataDir}/lib
ln -sfT ${cfg.package}/modules ${cfg.dataDir}/modules
if [ "$(id -u)" = 0 ]; then chown -R elasticsearch ${cfg.dataDir}; fi
# elasticsearch needs to create the elasticsearch.keystore in the config directory
# so this directory needs to be writable.
mkdir -m 0700 -p ${configDir}
# Note that we copy config files from the nix store instead of symbolically linking them
# because otherwise X-Pack Security will raise the following exception:
# java.security.AccessControlException:
# access denied ("java.io.FilePermission" "/var/lib/elasticsearch/config/elasticsearch.yml" "read")
cp ${elasticsearchYml} ${configDir}/elasticsearch.yml
# Make sure the logging configuration for old elasticsearch versions is removed:
rm -f ${if es5 then "${configDir}/logging.yml" else "${configDir}/log4j2.properties"}
cp ${loggingConfigFile} ${configDir}/${loggingConfigFilename}
${optionalString es5 "mkdir -p ${configDir}/scripts"}
${optionalString es6 "cp ${cfg.package}/config/jvm.options ${configDir}/jvm.options"}
if [ "$(id -u)" = 0 ]; then chown -R elasticsearch:elasticsearch ${cfg.dataDir}; fi
'';
};

View file

@ -66,7 +66,7 @@ in {
description = "Caddy web server";
after = [ "network-online.target" ];
wantedBy = [ "multi-user.target" ];
environment = mkIf (versionAtLeast config.system.nixos.stateVersion "17.09")
environment = mkIf (versionAtLeast config.system.stateVersion "17.09")
{ CADDYPATH = cfg.dataDir; };
serviceConfig = {
ExecStart = ''

View file

@ -70,8 +70,6 @@ let
"systemd-journald.socket"
"systemd-journald.service"
"systemd-journal-flush.service"
"systemd-journal-gatewayd.socket"
"systemd-journal-gatewayd.service"
"systemd-journal-catalog-update.service"
"systemd-journald-audit.socket"
"systemd-journald-dev-log.socket"
@ -160,8 +158,10 @@ let
"systemd-binfmt.service"
"systemd-exit.service"
"systemd-update-done.service"
]
++ cfg.additionalUpstreamSystemUnits;
] ++ optionals config.services.journald.enableHttpGateway [
"systemd-journal-gatewayd.socket"
"systemd-journal-gatewayd.service"
] ++ cfg.additionalUpstreamSystemUnits;
upstreamSystemWants =
[ "sysinit.target.wants"

View file

@ -127,7 +127,7 @@ with import ../../lib/qemu-flags.nix { inherit pkgs; };
services.xserver.displayManager.job.logToJournal = true;
# set default stateVersion to avoid warnings during eval
system.nixos.stateVersion = mkDefault "18.03";
system.stateVersion = mkDefault "18.03";
};
}

View file

@ -3,7 +3,7 @@
options = {
ec2 = {
hvm = lib.mkOption {
default = lib.versionAtLeast config.system.nixos.stateVersion "17.03";
default = lib.versionAtLeast config.system.stateVersion "17.03";
internal = true;
description = ''
Whether the EC2 instance is a HVM instance.

View file

@ -607,7 +607,7 @@ in
{ services.postgresql.enable = true;
services.postgresql.package = pkgs.postgresql96;
system.nixos.stateVersion = "17.03";
system.stateVersion = "17.03";
};
};
}

View file

@ -240,22 +240,22 @@ let self = {
"17.09".sa-east-1.hvm-ebs = "ami-4762202b";
"17.09".ap-south-1.hvm-ebs = "ami-4e376021";
# 18.03.131792.becbe4dbe16
"18.03".eu-west-1.hvm-ebs = "ami-cda4fab4";
"18.03".eu-west-2.hvm-ebs = "ami-d96786be";
"18.03".eu-west-3.hvm-ebs = "ami-6b0cba16";
"18.03".eu-central-1.hvm-ebs = "ami-5e2b75b5";
"18.03".us-east-1.hvm-ebs = "ami-d464cba9";
"18.03".us-east-2.hvm-ebs = "ami-fd221298";
"18.03".us-west-1.hvm-ebs = "ami-ff0d1d9f";
"18.03".us-west-2.hvm-ebs = "ami-c05c3bb8";
"18.03".ca-central-1.hvm-ebs = "ami-cc72f4a8";
"18.03".ap-southeast-1.hvm-ebs = "ami-b61633ca";
"18.03".ap-southeast-2.hvm-ebs = "ami-530fc131";
"18.03".ap-northeast-1.hvm-ebs = "ami-90d6c0ec";
"18.03".ap-northeast-2.hvm-ebs = "ami-a1248bcf";
"18.03".sa-east-1.hvm-ebs = "ami-b090c6dc";
"18.03".ap-south-1.hvm-ebs = "ami-32c9ec5d";
# 18.03.132946.1caae7247b8
"18.03".eu-west-1.hvm-ebs = "ami-065c46ec";
"18.03".eu-west-2.hvm-ebs = "ami-64f31903";
"18.03".eu-west-3.hvm-ebs = "ami-5a8d3d27";
"18.03".eu-central-1.hvm-ebs = "ami-09faf9e2";
"18.03".us-east-1.hvm-ebs = "ami-8b3538f4";
"18.03".us-east-2.hvm-ebs = "ami-150b3170";
"18.03".us-west-1.hvm-ebs = "ami-ce06ebad";
"18.03".us-west-2.hvm-ebs = "ami-586c3520";
"18.03".ca-central-1.hvm-ebs = "ami-aca72ac8";
"18.03".ap-southeast-1.hvm-ebs = "ami-aa0b4d40";
"18.03".ap-southeast-2.hvm-ebs = "ami-d0f254b2";
"18.03".ap-northeast-1.hvm-ebs = "ami-456511a8";
"18.03".ap-northeast-2.hvm-ebs = "ami-3366d15d";
"18.03".sa-east-1.hvm-ebs = "ami-163e1f7a";
"18.03".ap-south-1.hvm-ebs = "ami-6a390b05";
latest = self."18.03";
}; in self

View file

@ -104,7 +104,7 @@ in {
config = mkIf cfg.enable {
environment.systemPackages = with pkgs; [ libvirt netcat-openbsd cfg.qemuPackage ];
environment.systemPackages = with pkgs; [ libvirt libressl.nc cfg.qemuPackage ];
boot.kernelModules = [ "tun" ];

View file

@ -198,7 +198,7 @@ in rec {
modules = singleton ({ ... }:
{ fileSystems."/".device = mkDefault "/dev/sda1";
boot.loader.grub.device = mkDefault "/dev/sda";
system.nixos.stateVersion = mkDefault "18.03";
system.stateVersion = mkDefault "18.03";
});
}).config.system.build.toplevel;
preferLocalBuild = true;

View file

@ -304,7 +304,7 @@ let
serviceConfig.Type = "oneshot";
serviceConfig.RemainAfterExit = true;
script = let
netcat = "${pkgs.netcat-openbsd}/bin/nc";
netcat = "${pkgs.libressl.nc}/bin/nc";
portCheck = "${netcat} -z 127.0.0.1 ${toString attrs.waitForPort}";
in "while ! ${portCheck}; do :; done";
};
@ -435,7 +435,7 @@ in {
serviceConfig.RemainAfterExit = true;
script = let
ports = lib.range 8000 8005 ++ lib.singleton 80;
netcat = "${pkgs.netcat-openbsd}/bin/nc";
netcat = "${pkgs.libressl.nc}/bin/nc";
mkPortCheck = port: "${netcat} -z 127.0.0.1 ${toString port}";
checks = "(${lib.concatMapStringsSep " && " mkPortCheck ports})";
in "while ! ${checks}; do :; done";

View file

@ -18,7 +18,7 @@ import ./make-test.nix ({ pkgs, ...} : {
inherit (config.nixpkgs.localSystem) system;
modules = lib.singleton {
containers.foo.config = {
system.nixos.stateVersion = "18.03";
system.stateVersion = "18.03";
};
};
};

View file

@ -21,7 +21,7 @@ import ./make-test.nix ({ pkgs, ...} : {
services.httpd.adminAddr = "foo@example.org";
networking.firewall.allowedTCPPorts = [ 80 ];
networking.firewall.allowPing = true;
system.nixos.stateVersion = "18.03";
system.stateVersion = "18.03";
};
};

View file

@ -1,4 +1,4 @@
{ system ? builtins.currentSystem }:
{ system ? builtins.currentSystem, enableUnfree ? false }:
with import ../lib/testing.nix { inherit system; };
with pkgs.lib;
let
@ -99,9 +99,16 @@ in mapAttrs mkElkTest {
logstash = pkgs.logstash5;
kibana = pkgs.kibana5;
};
"ELK-6" = {
elasticsearch = pkgs.elasticsearch6;
logstash = pkgs.logstash6;
kibana = pkgs.kibana6;
};
"ELK-6" =
if enableUnfree
then {
elasticsearch = pkgs.elasticsearch6;
logstash = pkgs.logstash6;
kibana = pkgs.kibana6;
}
else {
elasticsearch = pkgs.elasticsearch6-oss;
logstash = pkgs.logstash6-oss;
kibana = pkgs.kibana6-oss;
};
}

View file

@ -43,7 +43,7 @@ in
});
})
];
system.nixos.stateVersion = "17.03";
system.stateVersion = "17.03";
};
radicale1_export = lib.recursiveUpdate radicale1 {
services.radicale.extraArgs = [
@ -54,7 +54,7 @@ in
services.radicale.extraArgs = [ "--verify-storage" ];
};
radicale2 = lib.recursiveUpdate (common args) {
system.nixos.stateVersion = "17.09";
system.stateVersion = "17.09";
};
};

View file

@ -555,12 +555,12 @@ rec {
spotbugs = buildEclipseUpdateSite rec {
name = "spotbugs-${version}";
version = "3.1.5";
version = "3.1.6";
src = fetchzip {
stripRoot = false;
url = "https://github.com/spotbugs/spotbugs/releases/download/${version}/eclipsePlugin.zip";
sha256 = "0fxdirz6ik9rqykm2lcr720apsaqgngr4c7q793rjb9b3bn30c85";
sha256 = "1qsams12n64slp00nfc9v943sy9bzffzm7anqqaz2hjw64iia7fh";
};
meta = with stdenv.lib; {

File diff suppressed because it is too large Load diff

View file

@ -25,7 +25,7 @@ self:
super = removeAttrs imported [ "dash" ];
elpaBuild = import ../../../build-support/emacs/elpa.nix {
inherit fetchurl lib stdenv texinfo;
inherit lib stdenv texinfo;
inherit (self) emacs;
};

File diff suppressed because it is too large Load diff

View file

@ -75,28 +75,16 @@ self:
# upstream issue: missing file header
elmine = markBroken super.elmine;
# upstream issue: missing dependency redshank
emr = markBroken super.emr;
ess-R-data-view = super.ess-R-data-view.override {
inherit (self.melpaPackages) ess ctable popup;
};
# upstream issue: missing dependency highlight
evil-search-highlight-persist = markBroken super.evil-search-highlight-persist;
# upstream issue: missing dependency highlight
floobits = markBroken super.floobits;
# missing OCaml
flycheck-ocaml = markBroken super.flycheck-ocaml;
# Expects bash to be at /bin/bash
flycheck-rtags = markBroken super.flycheck-rtags;
# upstream issue: missing dependency
fold-dwim-org = markBroken super.fold-dwim-org;
# build timeout
graphene = markBroken super.graphene;
@ -106,6 +94,14 @@ self:
# Expects bash to be at /bin/bash
helm-rtags = markBroken super.helm-rtags;
# Build same version as Haskell package
hindent = super.hindent.overrideAttrs (attrs: {
version = external.hindent.version;
src = external.hindent.src;
packageRequires = [ self.haskell-mode ];
propagatedUserEnvPkgs = [ external.hindent ];
});
# upstream issue: missing file header
ido-complete-space-or-hyphen = markBroken super.ido-complete-space-or-hyphen;
@ -158,9 +154,6 @@ self:
(attrs.nativeBuildInputs or []) ++ [ external.git ];
}));
# upstream issue: missing dependency
org-readme = markBroken super.org-readme;
# upstream issue: truncated file
powershell = markBroken super.powershell;
@ -173,9 +166,6 @@ self:
# upstream issue: missing file footer
seoul256-theme = markBroken super.seoul256-theme;
# upstream issue: missing dependency highlight
sonic-pi = markBroken super.sonic-pi;
spaceline = super.spaceline.override {
inherit (self.melpaPackages) powerline;
};
@ -198,9 +188,6 @@ self:
# upstream issue: missing file header
voca-builder = markBroken super.voca-builder;
# upstream issue: missing dependency
weechat-alert = markBroken super.weechat-alert;
# upstream issue: missing file header
window-numbering = markBroken super.window-numbering;
@ -216,6 +203,10 @@ self:
});
};
melpaPackages = super // overrides;
melpaPackages =
removeAttrs (super // overrides)
[
"show-marks" # missing dependency: fm
];
in
melpaPackages // { inherit melpaPackages; }

File diff suppressed because it is too large Load diff

View file

@ -108,6 +108,14 @@ self:
# Expects bash to be at /bin/bash
helm-rtags = markBroken super.helm-rtags;
# Build same version as Haskell package
hindent = super.hindent.overrideAttrs (attrs: {
version = external.hindent.version;
src = external.hindent.src;
packageRequires = [ self.haskell-mode ];
propagatedUserEnvPkgs = [ external.hindent ];
});
# upstream issue: missing file header
ido-complete-space-or-hyphen = markBroken super.ido-complete-space-or-hyphen;

View file

@ -3,10 +3,11 @@
org = callPackage ({ elpaBuild, fetchurl, lib }:
elpaBuild {
pname = "org";
version = "20180716";
ename = "org";
version = "20180723";
src = fetchurl {
url = "http://orgmode.org/elpa/org-20180716.tar";
sha256 = "0gr57nfdncnxrxxzw87ni5i6zjh1mdxl9h8pw96msh1c47xhpk2d";
url = "http://orgmode.org/elpa/org-20180723.tar";
sha256 = "1mcgnba16lpyh55zjx4rcbmpygcmdnjjzvgv1rx0c3kz1h5fgzf8";
};
packageRequires = [];
meta = {
@ -17,10 +18,11 @@
org-plus-contrib = callPackage ({ elpaBuild, fetchurl, lib }:
elpaBuild {
pname = "org-plus-contrib";
version = "20180716";
ename = "org-plus-contrib";
version = "20180723";
src = fetchurl {
url = "http://orgmode.org/elpa/org-plus-contrib-20180716.tar";
sha256 = "0j4r3bcy96kcaab7cv2a5qd0mv8ddkr1qlihijk79l9nhsh2y4hm";
url = "http://orgmode.org/elpa/org-plus-contrib-20180723.tar";
sha256 = "1l34bagkm8mcyv5diprpbd4yjijkdvx1l54qpvi8bmvxjnzsm7mk";
};
packageRequires = [];
meta = {

View file

@ -1,4 +1,4 @@
{ stdenv, fetchurl, gtk2, which, pkgconfig, intltool, file, libintl }:
{ stdenv, fetchurl, gtk2, which, pkgconfig, intltool, file, libintl, hicolor-icon-theme }:
with stdenv.lib;
@ -15,7 +15,7 @@ stdenv.mkDerivation rec {
};
nativeBuildInputs = [ pkgconfig intltool libintl ];
buildInputs = [ gtk2 which file ];
buildInputs = [ gtk2 which file hicolor-icon-theme ];
doCheck = true;
@ -23,10 +23,6 @@ stdenv.mkDerivation rec {
patchPhase = "patchShebangs .";
# This file should normally require a gtk-update-icon-cache -q /usr/share/icons/hicolor command
# It have no reasons to exist in a redistribuable package
postInstall = "rm $out/share/icons/hicolor/icon-theme.cache";
meta = {
description = "Small and lightweight IDE";
longDescription = ''

View file

@ -60,7 +60,7 @@ let
'';
postInstall = stdenv.lib.optionalString stdenv.isLinux ''
sed -i -e "s|'xsel|'${xsel}/bin/xsel|" $out/share/nvim/runtime/autoload/provider/clipboard.vim
sed -i -e "s|'xsel|'${xsel}/bin/xsel|g" $out/share/nvim/runtime/autoload/provider/clipboard.vim
'' + stdenv.lib.optionalString (withJemalloc && stdenv.isDarwin) ''
install_name_tool -change libjemalloc.1.dylib \
${jemalloc}/lib/libjemalloc.1.dylib \

View file

@ -1,7 +1,7 @@
# TODO tidy up eg The patchelf code is patching gvim even if you don't build it..
# but I have gvim with python support now :) - Marc
args@{ source ? "default", callPackage, fetchurl, stdenv, ncurses, pkgconfig, gettext
, composableDerivation, writeText, lib, config, glib, gtk2, gtk3, python, perl, tcl, ruby
, writeText, lib, config, glib, gtk2, gtk3, python, perl, tcl, ruby
, libX11, libXext, libSM, libXpm, libXt, libXaw, libXau, libXmu
, libICE
, vimPlugins
@ -10,13 +10,27 @@ args@{ source ? "default", callPackage, fetchurl, stdenv, ncurses, pkgconfig, ge
# apple frameworks
, CoreServices, CoreData, Cocoa, Foundation, libobjc, cf-private
, wrapPythonDrv ? false
, features ? "huge" # One of tiny, small, normal, big or huge
, wrapPythonDrv ? false
, guiSupport ? config.vim.gui or "auto"
, luaSupport ? config.vim.lua or true
, perlSupport ? config.vim.perl or false # Perl interpreter
, pythonSupport ? config.vim.python or true # Python interpreter
, rubySupport ? config.vim.ruby or true # Ruby interpreter
, nlsSupport ? config.vim.nls or false # Enable NLS (gettext())
, tclSupport ? config.vim.tcl or false # Include Tcl interpreter
, multibyteSupport ? config.vim.multibyte or false # Enable multibyte editing support
, cscopeSupport ? config.vim.cscope or true # Enable cscope interface
, netbeansSupport ? config.netbeans or true # Enable NetBeans integration support.
, ximSupport ? config.vim.xim or true # less than 15KB, needed for deadkeys
# By default, compile with darwin support if we're compiling on darwin, but
# allow this to be disabled by setting config.vim.darwin to false
, darwinSupport ? stdenv.isDarwin && (config.vim.darwin or true) # Enable Darwin support
, ftNixSupport ? config.vim.ftNix or true # Add .nix filetype detection and minimal syntax highlighting support
, ... }: with args;
let
inherit (args.composableDerivation) composableDerivation edf;
nixosRuntimepath = writeText "nixos-vimrc" ''
set nocompatible
syntax on
@ -48,148 +62,110 @@ let
'';
common = callPackage ./common.nix {};
in
composableDerivation {
} (fix: rec {
name = "vim_configurable-${version}";
isPython3 = python.isPy3 or false;
inherit (common) version postPatch hardeningDisable enableParallelBuilding meta;
in stdenv.mkDerivation rec {
src = builtins.getAttr source {
"default" = common.src; # latest release
name = "vim_configurable-${version}";
"vim-nox" =
{
# vim nox branch: client-server without X by uing sockets
# REGION AUTO UPDATE: { name="vim-nox"; type="hg"; url="https://code.google.com/r/yukihironakadaira-vim-cmdsrv-nox/"; branch="cmdsrv-nox"; }
src = (fetchurl { url = "http://mawercer.de/~nix/repos/vim-nox-hg-2082fc3.tar.bz2"; sha256 = "293164ca1df752b7f975fd3b44766f5a1db752de6c7385753f083499651bd13a"; });
name = "vim-nox-hg-2082fc3";
# END
}.src;
};
inherit (common) version postPatch hardeningDisable enableParallelBuilding meta;
patches = [ ./cflags-prune.diff ];
src = builtins.getAttr source {
"default" = common.src; # latest release
configureFlags
= [ "--enable-gui=${args.gui}" "--with-features=${args.features}" ];
nativeBuildInputs = [ pkgconfig ];
buildInputs
= [ ncurses libX11 libXext libSM libXpm libXt libXaw libXau
libXmu glib libICE ] ++ (if args.gui == "gtk3" then [gtk3] else [gtk2]);
# most interpreters aren't tested yet.. (see python for example how to do it)
flags = {
ftNix = {
patches = [ ./ft-nix-support.patch ];
preConfigure = ''
cp ${vimPlugins.vim-nix.src}/ftplugin/nix.vim runtime/ftplugin/nix.vim
cp ${vimPlugins.vim-nix.src}/indent/nix.vim runtime/indent/nix.vim
cp ${vimPlugins.vim-nix.src}/syntax/nix.vim runtime/syntax/nix.vim
'';
};
}
// edf {
name = "darwin";
enable = {
buildInputs = [ CoreServices CoreData Cocoa Foundation libobjc cf-private ];
NIX_LDFLAGS = stdenv.lib.optional stdenv.isDarwin
"/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation";
};
} #Disable Darwin (macOS) support.
// edf { name = "xsmp"; } #Disable XSMP session management
// edf { name = "xsmp_interact"; } #Disable XSMP interaction
// edf { name = "mzscheme"; feat = "mzschemeinterp";} #Include MzScheme interpreter.
// edf { name = "perl"; feat = "perlinterp"; enable = { nativeBuildInputs = [perl]; };} #Include Perl interpreter.
// edf {
name = "python";
feat = "python${if python ? isPy3 then "3" else ""}interp";
enable = {
buildInputs = [ python ];
} // lib.optionalAttrs wrapPythonDrv {
nativeBuildInputs = [ makeWrapper ];
postInstall = ''
wrapProgram "$out/bin/vim" --prefix PATH : "${python}/bin"
'';
} // lib.optionalAttrs stdenv.isDarwin {
configureFlags
= [ "--enable-python${if python ? isPy3 then "3" else ""}interp=yes"
"--with-python${if python ? isPy3 then "3" else ""}-config-dir=${python}/lib"
"--disable-python${if python ? isPy3 then "" else "3"}interp" ];
};
}
// edf { name = "tcl"; feat = "tclinterp"; enable = { buildInputs = [tcl]; }; } #Include Tcl interpreter.
// edf { name = "ruby"; feat = "rubyinterp"; enable = { buildInputs = [ruby]; };} #Include Ruby interpreter.
// edf {
name = "lua";
feat = "luainterp";
enable = {
buildInputs = [lua];
configureFlags = [
"--with-lua-prefix=${args.lua}"
"--enable-luainterp"
];
};
}
// edf { name = "cscope"; } #Include cscope interface.
// edf { name = "workshop"; } #Include Sun Visual Workshop support.
// edf { name = "netbeans"; } #Disable NetBeans integration support.
// edf { name = "sniff"; feat = "sniff" ; } #Include Sniff interface.
// edf { name = "multibyte"; } #Include multibyte editing support.
// edf { name = "hangulinput"; feat = "hangulinput" ;} #Include Hangul input support.
// edf { name = "xim"; } #Include XIM input support.
// edf { name = "fontset"; } #Include X fontset output support.
// edf { name = "acl"; } #Don't check for ACL support.
// edf { name = "gpm"; } #Don't use gpm (Linux mouse daemon).
// edf { name = "nls"; enable = {nativeBuildInputs = [gettext];}; } #Don't support NLS (gettext()).
;
cfg = {
luaSupport = config.vim.lua or true;
pythonSupport = config.vim.python or true;
rubySupport = config.vim.ruby or true;
nlsSupport = config.vim.nls or false;
tclSupport = config.vim.tcl or false;
multibyteSupport = config.vim.multibyte or false;
cscopeSupport = config.vim.cscope or true;
netbeansSupport = config.netbeans or true; # eg envim is using it
ximSupport = config.vim.xim or true; # less than 15KB, needed for deadkeys
# by default, compile with darwin support if we're compiling on darwin, but
# allow this to be disabled by setting config.vim.darwin to false
darwinSupport = stdenv.isDarwin && (config.vim.darwin or true);
# add .nix filetype detection and minimal syntax highlighting support
ftNixSupport = config.vim.ftNix or true;
"vim-nox" =
{
# vim nox branch: client-server without X by uing sockets
# REGION AUTO UPDATE: { name="vim-nox"; type="hg"; url="https://code.google.com/r/yukihironakadaira-vim-cmdsrv-nox/"; branch="cmdsrv-nox"; }
src = (fetchurl { url = "http://mawercer.de/~nix/repos/vim-nox-hg-2082fc3.tar.bz2"; sha256 = "293164ca1df752b7f975fd3b44766f5a1db752de6c7385753f083499651bd13a"; });
name = "vim-nox-hg-2082fc3";
# END
}.src;
};
#--enable-gui=OPTS X11 GUI default=auto OPTS=auto/no/gtk/gtk2/gtk3/gnome/gnome2/motif/athena/neXtaw/photon/carbon
/*
// edf "gtk_check" "gtk_check" { } #If auto-select GUI, check for GTK default=yes
// edf "gtk2_check" "gtk2_check" { } #If GTK GUI, check for GTK+ 2 default=yes
// edf "gnome_check" "gnome_check" { } #If GTK GUI, check for GNOME default=no
// edf "motif_check" "motif_check" { } #If auto-select GUI, check for Motif default=yes
// edf "athena_check" "athena_check" { } #If auto-select GUI, check for Athena default=yes
// edf "nextaw_check" "nextaw_check" { } #If auto-select GUI, check for neXtaw default=yes
// edf "carbon_check" "carbon_check" { } #If auto-select GUI, check for Carbon default=yes
// edf "gtktest" "gtktest" { } #Do not try to compile and run a test GTK program
*/
patches = [ ./cflags-prune.diff ] ++ stdenv.lib.optional ftNixSupport ./ft-nix-support.patch;
preInstall = ''
mkdir -p $out/share/applications $out/share/icons/{hicolor,locolor}/{16x16,32x32,48x48}/apps
'';
configureFlags = [
"--enable-gui=${guiSupport}"
"--with-features=${features}"
"--disable-xsmp" # XSMP session management
"--disable-xsmp_interact" # XSMP interaction
"--disable-workshop" # Sun Visual Workshop support
"--disable-sniff" # Sniff interface
"--disable-hangulinput" # Hangul input support
"--disable-fontset" # X fontset output support
"--disable-acl" # ACL support
"--disable-gpm" # GPM (Linux mouse daemon)
"--disable-mzschemeinterp"
"--disable-gtk_check"
"--disable-gtk2_check"
"--disable-gnome_check"
"--disable-motif_check"
"--disable-athena_check"
"--disable-nextaf_check"
"--disable-carbon_check"
"--disable-gtktest"
]
++ stdenv.lib.optionals luaSupport [
"--with-lua-prefix=${args.lua}"
"--enable-luainterp"
]
++ stdenv.lib.optionals pythonSupport [
"--enable-python${if isPython3 then "3" else ""}interp=yes"
"--with-python${if isPython3 then "3" else ""}-config-dir=${python}/lib"
"--disable-python${if (!isPython3) then "3" else ""}interp"
]
++ stdenv.lib.optional nlsSupport "--enable-nls"
++ stdenv.lib.optional perlSupport "--enable-perlinterp"
++ stdenv.lib.optional rubySupport "--enable-rubyinterp"
++ stdenv.lib.optional tclSupport "--enable-tclinterp"
++ stdenv.lib.optional multibyteSupport "--enable-multibyte"
++ stdenv.lib.optional cscopeSupport "--enable-cscope"
++ stdenv.lib.optional netbeansSupport "--enable-netbeans"
++ stdenv.lib.optional ximSupport "--enable-xim";
postInstall = stdenv.lib.optionalString stdenv.isLinux ''
nativeBuildInputs = [
pkgconfig
]
++ stdenv.lib.optional wrapPythonDrv makeWrapper
++ stdenv.lib.optional nlsSupport gettext
++ stdenv.lib.optional perlSupport perl
;
buildInputs = [ ncurses libX11 libXext libSM libXpm libXt libXaw libXau
libXmu glib libICE ]
++ (if guiSupport == "gtk3" then [gtk3] else [gtk2])
++ stdenv.lib.optionals darwinSupport [ CoreServices CoreData Cocoa Foundation libobjc cf-private ]
++ stdenv.lib.optional luaSupport lua
++ stdenv.lib.optional pythonSupport python
++ stdenv.lib.optional tclSupport tcl
++ stdenv.lib.optional rubySupport ruby;
preConfigure = ''
'' + stdenv.lib.optionalString ftNixSupport ''
cp ${vimPlugins.vim-nix.src}/ftplugin/nix.vim runtime/ftplugin/nix.vim
cp ${vimPlugins.vim-nix.src}/indent/nix.vim runtime/indent/nix.vim
cp ${vimPlugins.vim-nix.src}/syntax/nix.vim runtime/syntax/nix.vim
'';
NIX_LDFLAGS = stdenv.lib.optionalString (darwinSupport && stdenv.isDarwin)
"/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation";
postInstall = ''
'' + stdenv.lib.optionalString stdenv.isLinux ''
patchelf --set-rpath \
"$(patchelf --print-rpath $out/bin/vim):${lib.makeLibraryPath buildInputs}" \
"$out"/bin/{vim,gvim}
ln -sfn '${nixosRuntimepath}' "$out"/share/vim/vimrc
'' + stdenv.lib.optionalString wrapPythonDrv ''
wrapProgram "$out/bin/vim" --prefix PATH : "${python}/bin"
'';
preInstall = ''
mkdir -p $out/share/applications $out/share/icons/{hicolor,locolor}/{16x16,32x32,48x48}/apps
'';
dontStrip = 1;
})
}

View file

@ -1,110 +1,94 @@
args@{ fetchgit, stdenv, ncurses, pkgconfig, gettext
, composableDerivation, lib, config, python, perl, tcl, ruby, qt4
, lib, config, python, perl, tcl, ruby, qt4
, libX11, libXext, libSM, libXpm, libXt, libXaw, libXau, libXmu
, libICE, ... }: with args;
, libICE
, lua
, features
, luaSupport ? config.vim.lua or true
, perlSupport ? config.vim.perl or false # Perl interpreter
, pythonSupport ? config.vim.python or true
, rubySupport ? config.vim.ruby or true
, nlsSupport ? config.vim.nls or false
, tclSupport ? config.vim.tcl or false
, multibyteSupport ? config.vim.multibyte or false
, cscopeSupport ? config.vim.cscope or false
, netbeansSupport ? config.netbeans or true # eg envim is using it
# by default, compile with darwin support if we're compiling on darwin, but
# allow this to be disabled by setting config.vim.darwin to false
, darwinSupport ? stdenv.isDarwin && (config.vim.darwin or true)
# add .nix filetype detection and minimal syntax highlighting support
, ftNixSupport ? config.vim.ftNix or true
, ... }: with args;
let tag = "20140827";
sha256 = "0ncgbcm23z25naicxqkblz0mcl1zar2qwgi37y5ar8q8884w9ml2";
in
in {
let inherit (args.composableDerivation) composableDerivation edf; in
composableDerivation {
} (fix: {
name = "qvim-7.4." + tag;
name = "qvim-7.4." + tag;
enableParallelBuilding = true; # test this
enableParallelBuilding = true; # test this
src = fetchgit {
url = https://bitbucket.org/equalsraf/vim-qt.git ;
rev = "refs/tags/package-" + tag;
inherit sha256;
};
# FIXME: adopt Darwin fixes from vim/default.nix, then chage meta.platforms.linux
# to meta.platforms.unix
preConfigure = assert (! stdenv.isDarwin); "";
configureFlags = [ "--with-vim-name=qvim" "--enable-gui=qt" "--with-features=${args.features}" ];
nativeBuildInputs
= [ ncurses pkgconfig libX11 libXext libSM libXpm libXt libXaw libXau
libXmu libICE qt4];
# most interpreters aren't tested yet.. (see python for example how to do it)
flags = {
ftNix = {
# because we cd to src in the main patch phase, we can't just add this
# patch to the list, we have to apply it manually
postPatch = ''
cd runtime
patch -p2 < ${./ft-nix-support.patch}
cd ..
'';
};
}
// edf { name = "darwin"; } #Disable Darwin (macOS) support.
// edf { name = "xsmp"; } #Disable XSMP session management
// edf { name = "xsmp_interact"; } #Disable XSMP interaction
// edf { name = "mzscheme"; } #Include MzScheme interpreter.
// edf { name = "perl"; feat = "perlinterp"; enable = { nativeBuildInputs = [perl]; };} #Include Perl interpreter.
// edf {
name = "python";
feat = "pythoninterp";
enable = {
nativeBuildInputs = [ python ];
} // lib.optionalAttrs stdenv.isDarwin {
configureFlags
= [ "--enable-pythoninterp=yes"
"--with-python-config-dir=${python}/lib" ];
};
}
// edf { name = "tcl"; enable = { nativeBuildInputs = [tcl]; }; } #Include Tcl interpreter.
// edf { name = "ruby"; feat = "rubyinterp"; enable = { nativeBuildInputs = [ruby]; };} #Include Ruby interpreter.
// edf {
name = "lua";
feat = "luainterp";
enable = {
nativeBuildInputs = [lua];
configureFlags = [
"--with-lua-prefix=${args.lua}"
"--enable-luainterp"
];
};
}
// edf { name = "cscope"; } #Include cscope interface.
// edf { name = "workshop"; } #Include Sun Visual Workshop support.
// edf { name = "netbeans"; } #Disable NetBeans integration support.
// edf { name = "sniff"; feat = "sniff" ; } #Include Sniff interface.
// edf { name = "multibyte"; } #Include multibyte editing support.
// edf { name = "hangulinput"; feat = "hangulinput" ;} #Include Hangul input support.
// edf { name = "xim"; } #Include XIM input support.
// edf { name = "fontset"; } #Include X fontset output support.
// edf { name = "acl"; } #Don't check for ACL support.
// edf { name = "gpm"; } #Don't use gpm (Linux mouse daemon).
// edf { name = "nls"; enable = {nativeBuildInputs = [gettext];}; } #Don't support NLS (gettext()).
;
cfg = {
luaSupport = config.vim.lua or true;
pythonSupport = config.vim.python or true;
rubySupport = config.vim.ruby or true;
nlsSupport = config.vim.nls or false;
tclSupport = config.vim.tcl or false;
multibyteSupport = config.vim.multibyte or false;
cscopeSupport = config.vim.cscope or false;
netbeansSupport = config.netbeans or true; # eg envim is using it
# by default, compile with darwin support if we're compiling on darwin, but
# allow this to be disabled by setting config.vim.darwin to false
darwinSupport = stdenv.isDarwin && (config.vim.darwin or true);
# add .nix filetype detection and minimal syntax highlighting support
ftNixSupport = config.vim.ftNix or true;
src = fetchgit {
url = https://bitbucket.org/equalsraf/vim-qt.git;
rev = "refs/tags/package-" + tag;
inherit sha256;
};
# FIXME: adopt Darwin fixes from vim/default.nix, then chage meta.platforms.linux
# to meta.platforms.unix
preConfigure = assert (! stdenv.isDarwin); "";
configureFlags = [
"--with-vim-name=qvim"
"--enable-gui=qt"
"--with-features=${features}"
"--disable-xsmp"
"--disable-xsmp_interact"
"--disable-workshop" # Sun Visual Workshop support
"--disable-sniff" # Sniff interface
"--disable-hangulinput" # Hangul input support
"--disable-fontset" # X fontset output support
"--disable-acl" # ACL support
"--disable-gpm" # GPM (Linux mouse daemon)
"--disable-mzscheme"
]
++ stdenv.lib.optionals luaSupport [
"--with-lua-prefix=${lua}"
"--enable-luainterp"
]
++ stdenv.lib.optional pythonSupport "--enable-pythoninterp"
++ stdenv.lib.optional (pythonSupport && stdenv.isDarwin) "--with-python-config-dir=${python}/lib"
++ stdenv.lib.optional nlsSupport "--enable-nls"
++ stdenv.lib.optional perlSupport "--enable-perlinterp"
++ stdenv.lib.optional rubySupport "--enable-rubyinterp"
++ stdenv.lib.optional tclSupport "--enable-tcl"
++ stdenv.lib.optional multibyteSupport "--enable-multibyte"
++ stdenv.lib.optional darwinSupport "--enable-darwin"
++ stdenv.lib.optional cscopeSupport "--enable-cscope";
nativeBuildInputs = [ ncurses pkgconfig libX11 libXext libSM libXpm libXt libXaw
libXau libXmu libICE qt4
]
++ stdenv.lib.optional nlsSupport gettext
++ stdenv.lib.optional perlSupport perl
++ stdenv.lib.optional pythonSupport python
++ stdenv.lib.optional tclSupport tcl
++ stdenv.lib.optional rubySupport ruby
++ stdenv.lib.optional luaSupport lua
;
postPatch = ''
'' + stdenv.lib.optionalString ftNixSupport ''
# because we cd to src in the main patch phase, we can't just add this
# patch to the list, we have to apply it manually
cd runtime
patch -p2 < ${./ft-nix-support.patch}
cd ..
'';
postInstall = stdenv.lib.optionalString stdenv.isLinux ''
rpath=`patchelf --print-rpath $out/bin/qvim`;
for i in $nativeBuildInputs; do
@ -125,5 +109,5 @@ composableDerivation {
maintainers = with maintainers; [ smironov ttuegel ];
platforms = platforms.linux;
};
})
}

View file

@ -82,6 +82,11 @@ in
--set-rpath "${rpath}" \
$out/lib/vscode/resources/app/node_modules.asar.unpacked/keytar/build/Release/keytar.node
patchelf \
--set-rpath "${rpath}" \
"$out/lib/vscode/resources/app/node_modules.asar.unpacked/native-keymap/build/Release/\
keymapping.node"
ln -s ${lib.makeLibraryPath [libsecret]}/libsecret-1.so.0 $out/lib/vscode/libsecret-1.so.0
'';

View file

@ -1,6 +1,6 @@
{ stdenv, fetchgit, autoconf, automake, libtool, gtk2, pkgconfig, perl,
perlXMLParser, libxml2, gettext, python, libxml2Python, docbook5, docbook_xsl,
libxslt, intltool, libart_lgpl, withGNOME ? false, libgnomeui,
libxslt, intltool, libart_lgpl, withGNOME ? false, libgnomeui, hicolor-icon-theme,
gtk-mac-integration }:
stdenv.mkDerivation rec {
@ -15,7 +15,7 @@ stdenv.mkDerivation rec {
buildInputs =
[ gtk2 perlXMLParser libxml2 gettext python libxml2Python docbook5
libxslt docbook_xsl libart_lgpl ]
libxslt docbook_xsl libart_lgpl hicolor-icon-theme ]
++ stdenv.lib.optional withGNOME libgnomeui
++ stdenv.lib.optional stdenv.isDarwin gtk-mac-integration;
@ -28,12 +28,6 @@ stdenv.mkDerivation rec {
hardeningDisable = [ "format" ];
# This file should normally require a gtk-update-icon-cache -q /usr/share/icons/hicolor command
# It have no reasons to exist in a redistribuable package
postInstall = ''
rm $out/share/icons/hicolor/icon-theme.cache
'';
meta = {
description = "Gnome Diagram drawing software";
homepage = http://live.gnome.org/Dia;

View file

@ -1,6 +1,6 @@
{ stdenv, fetchurl, barcode, gnome3, autoreconfHook
, gtk3, gtk-doc, libxml2, librsvg , libtool, libe-book
, intltool, itstool, makeWrapper, pkgconfig
, intltool, itstool, makeWrapper, pkgconfig, hicolor-icon-theme
}:
stdenv.mkDerivation rec {
@ -17,11 +17,10 @@ stdenv.mkDerivation rec {
barcode gtk3 gtk-doc gnome3.yelp-tools
gnome3.gnome-common gnome3.gsettings-desktop-schemas
itstool libxml2 librsvg libe-book libtool
hicolor-icon-theme
];
preFixup = ''
rm "$out/share/icons/hicolor/icon-theme.cache"
wrapProgram "$out/bin/glabels-3" \
--prefix XDG_DATA_DIRS : "$GSETTINGS_SCHEMAS_PATH"
'';

View file

@ -2,7 +2,7 @@
, libpng, zlib, popt, boehmgc, libxml2, libxslt, glib, gtkmm2
, glibmm, libsigcxx, lcms, boost, gettext, makeWrapper
, gsl, python2, poppler, imagemagick, libwpg, librevenge
, libvisio, libcdr, libexif, potrace, cmake
, libvisio, libcdr, libexif, potrace, cmake, hicolor-icon-theme
}:
let
@ -44,15 +44,13 @@ stdenv.mkDerivation rec {
libXft libpng zlib popt boehmgc
libxml2 libxslt glib gtkmm2 glibmm libsigcxx lcms boost gettext
gsl poppler imagemagick libwpg librevenge
libvisio libcdr libexif potrace
libvisio libcdr libexif potrace hicolor-icon-theme
];
enableParallelBuilding = true;
postInstall = ''
# Make sure PyXML modules can be found at run-time.
rm -f "$out/share/icons/hicolor/icon-theme.cache"
'' + stdenv.lib.optionalString stdenv.isDarwin ''
# Make sure PyXML modules can be found at run-time.
postInstall = stdenv.lib.optionalString stdenv.isDarwin ''
install_name_tool -change $out/lib/libinkscape_base.dylib $out/lib/inkscape/libinkscape_base.dylib $out/bin/inkscape
install_name_tool -change $out/lib/libinkscape_base.dylib $out/lib/inkscape/libinkscape_base.dylib $out/bin/inkview
'';

View file

@ -49,18 +49,18 @@ let
];
in buildRustPackage rec {
name = "alacritty-unstable-${version}";
version = "2018-05-09";
version = "2018-07-20";
# At the moment we cannot handle git dependencies in buildRustPackage.
# This fork only replaces rust-fontconfig/libfontconfig with a git submodules.
src = fetchgit {
url = https://github.com/Mic92/alacritty.git;
rev = "rev-${version}";
sha256 = "0mgi4niy40zz80k2ammbzdw9d8flvfkwlxkjnbpwrrldd0sj8dlz";
sha256 = "1vhjmysfra6dsbv35qbvsf76rhkj990lgns0k0gpbcrf47gsvx1n";
fetchSubmodules = true;
};
cargoSha256 = "0d6bqfnwqfxqllrf00p1djlxdvnhrahgnyqv842qjn94j3wf0fym";
cargoSha256 = "0rs2p4sik25ynx6ri2wlg8v6vrdmf10xxnw9f2aqyps9m038i9di";
nativeBuildInputs = [
cmake
@ -87,7 +87,7 @@ in buildRustPackage rec {
mkdir $out/Applications
cp -r target/release/osx/Alacritty.app $out/Applications/Alacritty.app
'' else ''
install -D Alacritty.desktop $out/share/applications/alacritty.desktop
install -D alacritty.desktop $out/share/applications/alacritty.desktop
patchelf --set-rpath "${stdenv.lib.makeLibraryPath rpathLibs}" $out/bin/alacritty
'') + ''

View file

@ -21,7 +21,7 @@ diff --git a/Makerules b/Makerules
-SYS_GLUT_CFLAGS :=
-SYS_GLUT_LIBS := -lglut -lGL
-
ifeq "$(shell pkg-config --exists 'libcrypto <= 1.0.1t' && echo yes)" "yes"
ifeq "$(shell pkg-config --exists 'libcrypto >= 1.1.0' && echo yes)" "yes"
HAVE_LIBCRYPTO := yes
SYS_LIBCRYPTO_CFLAGS := -DHAVE_LIBCRYPTO $(shell pkg-config --cflags libcrypto)
@@ -113,7 +101,7 @@ SYS_CURL_CFLAGS += $(shell pkg-config --cflags openssl)
@ -33,3 +33,15 @@ diff --git a/Makerules b/Makerules
ifeq "$(shell pkg-config --exists x11 xext && echo yes)" "yes"
HAVE_X11 := yes
diff --git a/platform/gl/gl-main.c b/platform/gl/gl-main.c
index d58f7ba..808af18 100644
--- a/platform/gl/gl-main.c
+++ b/platform/gl/gl-main.c
@@ -16,6 +16,7 @@ void glutExit(void) {}
void glutMouseWheelFunc(void *fn) {}
void glutInitErrorFunc(void *fn) {}
void glutInitWarningFunc(void *fn) {}
+#define glutSetOption(X,Y)
#endif
enum

View file

@ -1,72 +1,32 @@
{ stdenv, go, fetchzip, git, fetchFromGitHub, fetchgit }:
{ buildGo110Package, fetchzip, lib }:
# When perkeep is updated all deps in the let block should be removed
let
gopherjs = fetchFromGitHub {
owner = "gopherjs";
repo = "gopherjs";
# Rev matching https://github.com/perkeep/perkeep/commit/2e46fca5cc1179dbd90bec49fec3870e6eca6c45
rev = "b40cd48c38f9a18eb3db20d163bad78de12cf0b7";
sha256 = "0kniz8dg5bymb03qriizza1h3gpymf97vsgq9vd222282pdj0vyc";
};
gotool = fetchFromGitHub {
owner = "kisielk";
repo = "gotool";
rev = "80517062f582ea3340cd4baf70e86d539ae7d84d";
sha256 = "14af2pa0ssyp8bp2mvdw184s5wcysk6akil3wzxmr05wwy951iwn";
};
gcimporter15 = fetchgit {
url = "https://go.googlesource.com/tools";
rev = "f8f2f88271bf2c23f28a09d288d26507a9503c97";
sha256 = "1pchwizx1sdli59g8r0p4djfjkchcvh8msfpp3ibvz3xl250jh0n";
};
in
stdenv.mkDerivation rec {
buildGo110Package rec {
name = "perkeep-${version}";
version = "20170505";
version = "0.10.1";
src = fetchzip {
url = "https://perkeep.org/dl/monthly/camlistore-${version}-src.zip";
sha256 = "1vliyvkyzmhdi6knbh8rdsswmz3h0rpxdpq037jwbdbkjccxjdwa";
url = "https://perkeep.org/dl/perkeep-${version}-src.zip";
sha256 = "0rqibc6w4m1r50i2pjcgz1k9dxh18v7jwj4s29y470bc526wv422";
};
# When perkeep is updated postPatch should be removed
postPatch = ''
rm -r ./vendor/github.com/gopherjs/gopherjs/
cp -a ${gopherjs} ./vendor/github.com/gopherjs/gopherjs
mkdir -p ./vendor/github.com/kisielk/
cp -a ${gotool} ./vendor/github.com/kisielk/gotool
mkdir -p ./vendor/golang.org/x/tools/go
cp -a ${gcimporter15}/go/gcimporter15 ./vendor/golang.org/x/tools/go/gcimporter15
goPackagePath = "perkeep.org";
substituteInPlace vendor/github.com/gopherjs/gopherjs/build/build.go \
--replace '"github.com/fsnotify/fsnotify"' 'fsnotify "camlistore.org/pkg/misc/fakefsnotify"'
substituteInPlace ./make.go \
--replace "goVersionMinor = '8'" "goVersionMinor = '9'" \
--replace "gopherJSGoMinor = '8'" "gopherJSGoMinor = '9'"
'';
buildInputs = [ git go ];
goPackagePath = "";
buildPhase = ''
cd "$NIX_BUILD_TOP/go/src/$goPackagePath"
go run make.go
'';
installPhase = ''
mkdir -p $out/bin
cp bin/* $out/bin
# devcam is only useful when developing perkeep, we should not install it as
# part of this derivation.
postInstall = ''
rm -f $out/bin/devcam
'';
meta = with stdenv.lib; {
meta = with lib; {
description = "A way of storing, syncing, sharing, modelling and backing up content (née Camlistore)";
homepage = https://perkeep.org;
license = licenses.asl20;
maintainers = with maintainers; [ cstrahan ];
maintainers = with maintainers; [ cstrahan kalbasit ];
platforms = platforms.unix;
};
}

View file

@ -8,6 +8,7 @@
, iwSupport ? true, wirelesstools ? null
, githubSupport ? false, curl ? null
, mpdSupport ? false, mpd_clientlib ? null
, pulseSupport ? false, libpulseaudio ? null
, i3Support ? false, i3GapsSupport ? false, i3 ? null, i3-gaps ? null, jsoncpp ? null
}:
@ -15,17 +16,18 @@ assert alsaSupport -> alsaLib != null;
assert githubSupport -> curl != null;
assert iwSupport -> wirelesstools != null;
assert mpdSupport -> mpd_clientlib != null;
assert pulseSupport -> libpulseaudio != null;
assert i3Support -> ! i3GapsSupport && jsoncpp != null && i3 != null;
assert i3GapsSupport -> ! i3Support && jsoncpp != null && i3-gaps != null;
stdenv.mkDerivation rec {
name = "polybar-${version}";
version = "3.1.0";
version = "3.2.0";
src = fetchgit {
url = "https://github.com/jaagr/polybar";
rev = "bf16a4d415ea7d8845f578544de0c71e56ad314e";
sha256 = "1jcvqxl0477j0snvh1rzqsm1dkfsybix2lgrlsgiczdxfknwz8iy";
rev = version;
sha256 = "0p94brndysvmmbidhl4ds4w3qvddb752s4vryp0qckb0hz3knqk8";
};
meta = with stdenv.lib; {
@ -48,6 +50,7 @@ stdenv.mkDerivation rec {
(if githubSupport then curl else null)
(if iwSupport then wirelesstools else null)
(if mpdSupport then mpd_clientlib else null)
(if pulseSupport then libpulseaudio else null)
(if i3Support || i3GapsSupport then jsoncpp else null)
(if i3Support then i3 else null)

View file

@ -3,8 +3,7 @@
with stdenv.lib;
let patches' = if patches == null then [] else patches;
in stdenv.mkDerivation rec {
stdenv.mkDerivation rec {
name = "st-0.8.1";
src = fetchurl {
@ -12,7 +11,7 @@ in stdenv.mkDerivation rec {
sha256 = "09k94v3n20gg32xy7y68p96x9dq5msl80gknf9gbvlyjp3i0zyy4";
};
patches = patches';
inherit patches;
configFile = optionalString (conf!=null) (writeText "config.def.h" conf);
preBuild = optionalString (conf!=null) "cp ${configFile} config.def.h";

View file

@ -65,6 +65,6 @@ mkDerivation rec {
homepage = https://yakuake.kde.org;
description = "Quad-style terminal emulator for KDE";
maintainers = with lib.maintainers; [ fridh ];
licenses = lib.licenses.gpl2;
license = lib.licenses.gpl2;
};
}

View file

@ -138,10 +138,6 @@ let
# for updated patches and hints about build flags
# (gentooPatch "<patch>" "0000000000000000000000000000000000000000000000000000000000000000")
./patches/fix-freetype.patch
] ++ optionals (versionRange "66" "68") [
./patches/nix_plugin_paths_52.patch
(githubPatch "4d10424f9e2a06978cdd6cdf5403fcaef18e49fc" "11la1jycmr5b5rw89mzcdwznmd2qh28sghvz9klr1qhmsmw1vzjc")
] ++ optionals (versionAtLeast version "68") [
./patches/nix_plugin_paths_68.patch
] ++ optionals (versionRange "68" "69") [
./patches/remove-webp-include-68.patch

View file

@ -1,70 +0,0 @@
diff --git a/chrome/common/chrome_paths.cc b/chrome/common/chrome_paths.cc
index f4e119d..d9775bd 100644
--- a/chrome/common/chrome_paths.cc
+++ b/chrome/common/chrome_paths.cc
@@ -68,21 +68,14 @@ static base::LazyInstance<base::FilePath>
g_invalid_specified_user_data_dir = LAZY_INSTANCE_INITIALIZER;
// Gets the path for internal plugins.
-bool GetInternalPluginsDirectory(base::FilePath* result) {
-#if defined(OS_MACOSX)
- // If called from Chrome, get internal plugins from a subdirectory of the
- // framework.
- if (base::mac::AmIBundled()) {
- *result = chrome::GetFrameworkBundlePath();
- DCHECK(!result->empty());
- *result = result->Append("Internet Plug-Ins");
- return true;
- }
- // In tests, just look in the module directory (below).
-#endif
-
- // The rest of the world expects plugins in the module directory.
- return PathService::Get(base::DIR_MODULE, result);
+bool GetInternalPluginsDirectory(base::FilePath* result,
+ const std::string& ident) {
+ std::string full_env = std::string("NIX_CHROMIUM_PLUGIN_PATH_") + ident;
+ const char* value = getenv(full_env.c_str());
+ if (value == NULL)
+ return PathService::Get(base::DIR_MODULE, result);
+ else
+ *result = base::FilePath(value);
}
// Gets the path for bundled implementations of components. Note that these
@@ -272,7 +265,7 @@ bool PathProvider(int key, base::FilePath* result) {
create_dir = true;
break;
case chrome::DIR_INTERNAL_PLUGINS:
- if (!GetInternalPluginsDirectory(&cur))
+ if (!GetInternalPluginsDirectory(&cur, "ALL"))
return false;
break;
case chrome::DIR_COMPONENTS:
@@ -280,7 +273,7 @@ bool PathProvider(int key, base::FilePath* result) {
return false;
break;
case chrome::DIR_PEPPER_FLASH_PLUGIN:
- if (!GetInternalPluginsDirectory(&cur))
+ if (!GetInternalPluginsDirectory(&cur, "PEPPERFLASH"))
return false;
cur = cur.Append(kPepperFlashBaseDirectory);
break;
@@ -323,7 +316,7 @@ bool PathProvider(int key, base::FilePath* result) {
// We currently need a path here to look up whether the plugin is disabled
// and what its permissions are.
case chrome::FILE_NACL_PLUGIN:
- if (!GetInternalPluginsDirectory(&cur))
+ if (!GetInternalPluginsDirectory(&cur, "NACL"))
return false;
cur = cur.Append(kInternalNaClPluginFileName);
break;
@@ -358,7 +351,7 @@ bool PathProvider(int key, base::FilePath* result) {
cur = cur.DirName();
}
#else
- if (!GetInternalPluginsDirectory(&cur))
+ if (!GetInternalPluginsDirectory(&cur, "PNACL"))
return false;
#endif
cur = cur.Append(FILE_PATH_LITERAL("pnacl"));

View file

@ -1,18 +1,18 @@
# This file is autogenerated from update.sh in the same directory.
{
beta = {
sha256 = "0m82ag02mydq5xkd0pamk2nq035j7yzhl47hnwl1irm632rpnfb4";
sha256bin64 = "0xx6kjaa13al1ka0rfcrz1aj0nwhdwzqakz533ghk8qyvhanypkp";
version = "68.0.3440.59";
sha256 = "193sz96jrygixgzkaxx1vrpkhmnr6c7yzhsvv4p1qn0jymh2xd57";
sha256bin64 = "0wwmfsxbphxqfw4g6jgxlr0p32vjf4h8yfd5zz36xpa79dryb8sv";
version = "68.0.3440.68";
};
dev = {
sha256 = "1gpjf213ai3sjh894jsl5ziild15049p6bnh36z0r1f5w68pzakg";
sha256bin64 = "1slj3gj4786lqrypng48zy5030snar8pirqwm92b5pq25xd595j8";
version = "69.0.3486.0";
sha256 = "102lqnl2m9cbcql6sghib1504fyicx7cgv0jkfx863jpzhrfrkcv";
sha256bin64 = "1y3iy25b3cck7kz5g913z64x1wdj1znqbn049g8h82x3krp76bgx";
version = "69.0.3497.12";
};
stable = {
sha256 = "0am0q0wkmrvhidi4x07fvgb4ymv5q3agmwzgm808dj7ninfnnba5";
sha256bin64 = "06baih4wf88rpmw73vfhap4dxd61vjgmr256ix8qd937x2hv7qd3";
version = "67.0.3396.99";
sha256 = "0hcmnn72xj9p3y77cb6cnr1vz81hiqmksdi6nw7xqfw5cwr7h5yw";
sha256bin64 = "0pa49yxj9s41mzhik7jixr4hwqanf31yzr1fsc6y5hkadbj7rwij";
version = "68.0.3440.75";
};
}

View file

@ -0,0 +1,30 @@
{ stdenv, fetchFromGitHub, lib, ... }:
stdenv.mkDerivation rec {
name = "kubetail-${version}";
version = "1.6.1";
src = fetchFromGitHub {
owner = "johanhaleby";
repo = "kubetail";
rev = "${version}";
sha256 = "10ql1kdsmyrk73jb6f5saf2q38znm0vdihscj3c9n0qhyhk9blpl";
};
installPhase = ''
install -Dm755 kubetail $out/bin/kubetail
'';
meta = with lib; {
description = "Bash script to tail Kubernetes logs from multiple pods at the same time";
longDescription = ''
Bash script that enables you to aggregate (tail/follow) logs from
multiple pods into one stream. This is the same as running "kubectl logs
-f " but for multiple pods.
'';
homepage = https://github.com/johanhaleby/kubetail;
license = licenses.asl20;
maintainers = with maintainers; [ kalbasit ];
platforms = platforms.all;
};
}

View file

@ -77,6 +77,6 @@ let unwrapped = stdenv.mkDerivation rec {
in if plugins == [] then unwrapped
else import ./wrapper.nix {
inherit stdenv makeWrapper symlinkJoin plugins;
inherit makeWrapper symlinkJoin plugins;
pidgin = unwrapped;
}

View file

@ -1,7 +1,7 @@
{ stdenv, fetchurl, pkgconfig, intltool, python3Packages, wrapGAppsHook
, glib, libxml2, libxslt, sqlite, libsoup , webkitgtk, json-glib, gst_all_1
, libnotify, gtk3, gsettings-desktop-schemas, libpeas, dconf, librsvg
, gobjectIntrospection, glib-networking
, gobjectIntrospection, glib-networking, hicolor-icon-theme
}:
let
@ -20,7 +20,7 @@ in stdenv.mkDerivation rec {
buildInputs = [
glib gtk3 webkitgtk libxml2 libxslt sqlite libsoup gsettings-desktop-schemas
libpeas gsettings-desktop-schemas json-glib dconf gobjectIntrospection
librsvg glib-networking libnotify
librsvg glib-networking libnotify hicolor-icon-theme
] ++ (with gst_all_1; [
gstreamer gst-plugins-base gst-plugins-good gst-plugins-bad
]);
@ -28,7 +28,6 @@ in stdenv.mkDerivation rec {
pythonPath = with python3Packages; [ pygobject3 pycairo ];
preFixup = ''
rm "$out/share/icons/hicolor/icon-theme.cache"
buildPythonPath "$out $pythonPath"
gappsWrapperArgs+=(--prefix PYTHONPATH : "$program_PYTHONPATH")
'';

View file

@ -1,5 +1,5 @@
{ stdenv, fetchurl, pkgconfig, intltool, file, wrapGAppsHook
, openssl, curl, libevent, inotify-tools, systemd, zlib
, openssl, curl, libevent, inotify-tools, systemd, zlib, hicolor-icon-theme
, enableGTK3 ? false, gtk3
, enableSystemd ? stdenv.isLinux
, enableDaemon ? true
@ -22,7 +22,8 @@ stdenv.mkDerivation rec {
buildInputs = [ intltool file openssl curl libevent zlib ]
++ optionals enableGTK3 [ gtk3 ]
++ optionals enableSystemd [ systemd ]
++ optionals stdenv.isLinux [ inotify-tools ];
++ optionals stdenv.isLinux [ inotify-tools ]
++ optionals enableGTK3 [ hicolor-icon-theme ];
postPatch = ''
substituteInPlace ./configure \
@ -39,10 +40,6 @@ stdenv.mkDerivation rec {
++ optional enableSystemd "--with-systemd-daemon"
++ optional enableGTK3 "--with-gtk";
preFixup = optionalString enableGTK3 ''
rm "$out/share/icons/hicolor/icon-theme.cache"
'';
NIX_LDFLAGS = optionalString stdenv.isDarwin "-framework CoreFoundation";
meta = with stdenv.lib; {

View file

@ -0,0 +1,48 @@
{ stdenv, fetchFromGitHub, makeWrapper, perl, perlPackages }: stdenv.mkDerivation rec {
name = "sieve-connect-${version}";
version = "0.89";
src = fetchFromGitHub {
owner = "philpennock";
repo = "sieve-connect";
rev = "v${version}";
sha256 = "0g7cv29wd5673inl4c87xb802k86bj6gcwh131xrbbg0a0g1c8fp";
};
buildInputs = [ perl ];
nativeBuildInputs = [ makeWrapper ];
preBuild = ''
# Fixes failing build when not building in git repo
mkdir .git
touch .git/HEAD
echo "${version}" > versionfile
echo "$(date +%Y-%m-%d)" > datefile
'';
buildFlags = [ "PERL5LIB=${stdenv.lib.makePerlPath [ perlPackages.FileSlurp ]}" "bin" "man" ];
installPhase = ''
mkdir -p $out/bin $out/share/man/man1
install -m 755 sieve-connect $out/bin
gzip -c sieve-connect.1 > $out/share/man/man1/sieve-connect.1.gz
wrapProgram $out/bin/sieve-connect \
--prefix PERL5LIB : "${stdenv.lib.makePerlPath (with perlPackages; [
AuthenSASL Socket6 IOSocketInet6 IOSocketSSL NetSSLeay NetDNS PodUsage
TermReadKey TermReadLineGnu ])}"
'';
meta = with stdenv.lib; {
description = "A client for the MANAGESIEVE Protocol";
longDescription = ''
This is sieve-connect. A client for the ManageSieve protocol,
as specifed in RFC 5804. Historically, this was MANAGESIEVE as
implemented by timsieved in Cyrus IMAP.
'';
homepage = https://github.com/philpennock/sieve-connect;
license = licenses.bsd3;
platforms = platforms.unix;
maintainers = with maintainers; [ das_j ];
};
}

View file

@ -1,7 +1,7 @@
{ fetchurl, stdenv, pkgconfig, libxml2, gconf, glib, gtk2, libgnomeui, libofx
, libgtkhtml, gtkhtml, libgnomeprint, goffice, enchant, gettext, libbonoboui
, intltool, perl, guile, slibGuile, swig, isocodes, bzip2, makeWrapper, libglade
, libgsf, libart_lgpl, perlPackages, aqbanking, gwenhywfar
, libgsf, libart_lgpl, perlPackages, aqbanking, gwenhywfar, hicolor-icon-theme
}:
/* If you experience GConf errors when running GnuCash on NixOS, see
@ -23,6 +23,7 @@ stdenv.mkDerivation rec {
libgnomeprint goffice enchant gettext intltool perl guile slibGuile
swig isocodes bzip2 makeWrapper libofx libglade libgsf libart_lgpl
perlPackages.DateManip perlPackages.FinanceQuote aqbanking gwenhywfar
hicolor-icon-theme
];
propagatedUserEnvPkgs = [ gconf ];
@ -49,8 +50,6 @@ stdenv.mkDerivation rec {
--set GCONF_CONFIG_SOURCE 'xml::~/.gconf' \
--prefix PATH ":" "$out/bin:${stdenv.lib.makeBinPath [ perl gconf ]}"
done
rm $out/share/icons/hicolor/icon-theme.cache
'';
# The following settings fix failures in the test suite. It's not required otherwise.

View file

@ -3,7 +3,7 @@
, glib, gtk2, libofx, aqbanking, gwenhywfar, libgnomecanvas, goffice
, webkit, glibcLocales, gsettings-desktop-schemas, dconf
, gettext, swig, slibGuile, enchant, bzip2, isocodes, libdbi, libdbiDrivers
, pango, gdk_pixbuf
, pango, gdk_pixbuf, hicolor-icon-theme
}:
/*
@ -36,7 +36,7 @@ stdenv.mkDerivation rec {
libxml2 libxslt glibcLocales gettext swig enchant
bzip2 isocodes
# glib, gtk...
glib gtk2 goffice webkit
glib gtk2 goffice webkit hicolor-icon-theme
# gnome...
dconf gconf libgnomecanvas gsettings-desktop-schemas
# financial
@ -83,8 +83,6 @@ stdenv.mkDerivation rec {
--prefix GIO_EXTRA_MODULES : "${stdenv.lib.getLib dconf}/lib/gio/modules" \
--prefix PATH ":" "$out/bin:${stdenv.lib.makeBinPath [ perl gconf ]}"
done
rm $out/share/icons/hicolor/icon-theme.cache
'';
# The following settings fix failures in the test suite. It's not required otherwise.

View file

@ -0,0 +1,100 @@
diff --git a/data/assets/scene/solarsystem/planets/jupiter/jup310.asset b/data/assets/scene/solarsystem/planets/jupiter/jup310.asset
index c15f6d9..1f8ddaf 100755
--- a/data/assets/scene/solarsystem/planets/jupiter/jup310.asset
+++ b/data/assets/scene/solarsystem/planets/jupiter/jup310.asset
@@ -1,8 +1,8 @@
-local Kernels = asset.syncedResource({
- Name = "Jupiter Spice Kernels (jup310)",
- Type = "TorrentSynchronization",
- Identifier = "jup310",
- Magnet = "magnet:?xt=urn:btih:E8B7D7E136DE1C6249158B254BFC8B9ECE2A0539&dn=jup310.bsp&tr=udp%3a%2f%2ftracker.openbittorrent.com%3a80%2fannounce&tr=udp%3a%2f%2ftracker.publicbt.com%3a80%2fannounce&tr=udp%3a%2f%2ftracker.ccc.de%3a80%2fannounce"
-})
+-- local Kernels = asset.syncedResource({
+-- Name = "Jupiter Spice Kernels (jup310)",
+-- Type = "TorrentSynchronization",
+-- Identifier = "jup310",
+-- Magnet = "magnet:?xt=urn:btih:E8B7D7E136DE1C6249158B254BFC8B9ECE2A0539&dn=jup310.bsp&tr=udp%3a%2f%2ftracker.openbittorrent.com%3a80%2fannounce&tr=udp%3a%2f%2ftracker.publicbt.com%3a80%2fannounce&tr=udp%3a%2f%2ftracker.ccc.de%3a80%2fannounce"
+-- })
-asset.export("Kernels", Kernels .. '/jup310.bsp')
+-- asset.export("Kernels", Kernels .. '/jup310.bsp')
diff --git a/data/assets/scene/solarsystem/planets/mars/mar097.asset b/data/assets/scene/solarsystem/planets/mars/mar097.asset
index e77d67d..8d738a6 100755
--- a/data/assets/scene/solarsystem/planets/mars/mar097.asset
+++ b/data/assets/scene/solarsystem/planets/mars/mar097.asset
@@ -1,8 +1,8 @@
-local Kernels = asset.syncedResource({
- Name = "Mars Spice Kernels",
- Type = "TorrentSynchronization",
- Identifier = "mat097",
- Magnet = "magnet:?xt=urn:btih:308F326B9AF864294D73042FBBED33B17291E27E&dn=mar097.bsp&tr=udp%3a%2f%2ftracker.openbittorrent.com%3a80%2fannounce&tr=udp%3a%2f%2ftracker.publicbt.com%3a80%2fannounce&tr=udp%3a%2f%2ftracker.ccc.de%3a80%2fannounce"
-})
+-- local Kernels = asset.syncedResource({
+-- Name = "Mars Spice Kernels",
+-- Type = "TorrentSynchronization",
+-- Identifier = "mat097",
+-- Magnet = "magnet:?xt=urn:btih:308F326B9AF864294D73042FBBED33B17291E27E&dn=mar097.bsp&tr=udp%3a%2f%2ftracker.openbittorrent.com%3a80%2fannounce&tr=udp%3a%2f%2ftracker.publicbt.com%3a80%2fannounce&tr=udp%3a%2f%2ftracker.ccc.de%3a80%2fannounce"
+-- })
-asset.export("Kernels", Kernels .. '/mar097.bsp')
+-- asset.export("Kernels", Kernels .. '/mar097.bsp')
diff --git a/data/assets/scene/solarsystem/planets/neptune/nep081.asset b/data/assets/scene/solarsystem/planets/neptune/nep081.asset
index e9c49ce..cfb5fac 100755
--- a/data/assets/scene/solarsystem/planets/neptune/nep081.asset
+++ b/data/assets/scene/solarsystem/planets/neptune/nep081.asset
@@ -1,8 +1,8 @@
-local Kernels = asset.syncedResource({
- Name = "Neptune Spice Kernels (nep081)",
- Type = "TorrentSynchronization",
- Identifier = "nep081",
- Magnet = "magnet:?xt=urn:btih:A6079CF8D4BF3B6BB38F4F9F633CB7724FF91693&dn=nep081.bsp&tr=udp%3a%2f%2ftracker.openbittorrent.com%3a80%2fannounce&tr=udp%3a%2f%2ftracker.publicbt.com%3a80%2fannounce&tr=udp%3a%2f%2ftracker.ccc.de%3a80%2fannounce"
-})
+-- local Kernels = asset.syncedResource({
+-- Name = "Neptune Spice Kernels (nep081)",
+-- Type = "TorrentSynchronization",
+-- Identifier = "nep081",
+-- Magnet = "magnet:?xt=urn:btih:A6079CF8D4BF3B6BB38F4F9F633CB7724FF91693&dn=nep081.bsp&tr=udp%3a%2f%2ftracker.openbittorrent.com%3a80%2fannounce&tr=udp%3a%2f%2ftracker.publicbt.com%3a80%2fannounce&tr=udp%3a%2f%2ftracker.ccc.de%3a80%2fannounce"
+-- })
-asset.export("Kernels", Kernels .. '/nep081.bsp')
+-- asset.export("Kernels", Kernels .. '/nep081.bsp')
diff --git a/data/assets/scene/solarsystem/planets/saturn/sat375.asset b/data/assets/scene/solarsystem/planets/saturn/sat375.asset
index a55f2ed..f904b3c 100755
--- a/data/assets/scene/solarsystem/planets/saturn/sat375.asset
+++ b/data/assets/scene/solarsystem/planets/saturn/sat375.asset
@@ -1,8 +1,8 @@
-local Kernels = asset.syncedResource({
- Name = "Saturn Spice Kernels (sat375)",
- Type = "TorrentSynchronization",
- Identifier = "sat375",
- Magnet = "magnet:?xt=urn:btih:79083d2069df389e65d7688bb326c7aaf1953845&dn=sat375.bsp"
-})
+-- local Kernels = asset.syncedResource({
+-- Name = "Saturn Spice Kernels (sat375)",
+-- Type = "TorrentSynchronization",
+-- Identifier = "sat375",
+-- Magnet = "magnet:?xt=urn:btih:79083d2069df389e65d7688bb326c7aaf1953845&dn=sat375.bsp"
+-- })
-asset.export("Kernels", Kernels .. '/sat375.bsp')
+-- asset.export("Kernels", Kernels .. '/sat375.bsp')
diff --git a/data/assets/scene/solarsystem/planets/uranus/ura111.asset b/data/assets/scene/solarsystem/planets/uranus/ura111.asset
index 665d059..8f95f34 100755
--- a/data/assets/scene/solarsystem/planets/uranus/ura111.asset
+++ b/data/assets/scene/solarsystem/planets/uranus/ura111.asset
@@ -1,8 +1,8 @@
-local Kernels = asset.syncedResource({
- Name = "Uranus Spice Kernels (ura111)",
- Type = "TorrentSynchronization",
- Identifier = "ura111",
- Magnet = "magnet:?xt=urn:btih:26C4903D1A12AE439480F31B45BAEB5781D2B305&dn=ura111.bsp&tr=udp%3a%2f%2ftracker.openbittorrent.com%3a80%2fannounce&tr=udp%3a%2f%2ftracker.publicbt.com%3a80%2fannounce&tr=udp%3a%2f%2ftracker.ccc.de%3a80%2fannounce"
-})
+-- local Kernels = asset.syncedResource({
+-- Name = "Uranus Spice Kernels (ura111)",
+-- Type = "TorrentSynchronization",
+-- Identifier = "ura111",
+-- Magnet = "magnet:?xt=urn:btih:26C4903D1A12AE439480F31B45BAEB5781D2B305&dn=ura111.bsp&tr=udp%3a%2f%2ftracker.openbittorrent.com%3a80%2fannounce&tr=udp%3a%2f%2ftracker.publicbt.com%3a80%2fannounce&tr=udp%3a%2f%2ftracker.ccc.de%3a80%2fannounce"
+-- })
-asset.export("Kernels", Kernels .. '/ura111.bsp')
+-- asset.export("Kernels", Kernels .. '/ura111.bsp')

View file

@ -0,0 +1,49 @@
diff --git a/openspace.cfg b/openspace.cfg
index c86830b..e7f89d9 100755
--- a/openspace.cfg
+++ b/openspace.cfg
@@ -2,18 +2,21 @@
-- require('scripts/configuration_helper.lua')
-- which defines helper functions useful to customize the configuration
+userdir = os.getenv("HOME") .. "/.openspace/"
+os.execute("mkdir -p " .. userdir)
+
return {
-- Determines which SGCT configuration file is loaded, that is, if there rendering
-- occurs in a single window, a fisheye projection, or a dome cluster system
-- A regular 1280x720 window
- SGCTConfig = sgct.config.single{},
+ -- SGCTConfig = sgct.config.single{},
-- A regular 1920x1080 window
-- SGCTConfig = sgct.config.single{1920, 1080},
-- A windowed 1920x1080 fullscreen
- -- SGCTConfig = sgct.config.single{1920, 1080, border=false, windowPos={0,0}, shared=true, name="WV_OBS_SPOUT1"},
+ SGCTConfig = sgct.config.single{1920, 1080, border=false, windowPos={0,0}, shared=true, name="WV_OBS_SPOUT1"},
-- A 1k fisheye rendering
-- SGCTConfig = sgct.config.fisheye{1024, 1024},
@@ -53,15 +56,15 @@ return {
TASKS = "${DATA}/tasks",
WEB = "${DATA}/web",
- CACHE = "${BASE}/cache",
+ CACHE = userdir .. "cache",
CONFIG = "${BASE}/config",
- DOCUMENTATION = "${BASE}/documentation",
- LOGS = "${BASE}/logs",
+ DOCUMENTATION = userdir .. "documentation",
+ LOGS = userdir .. "logs",
MODULES = "${BASE}/modules",
SCRIPTS = "${BASE}/scripts",
SHADERS = "${BASE}/shaders",
- SYNC = "${BASE}/sync",
- TESTDIR = "${BASE}/tests"
+ SYNC = userdir .. "sync",
+ TESTDIR = userdir .. "tests"
},
Fonts = {
Mono = "${FONTS}/Bitstream-Vera-Sans-Mono/VeraMono.ttf",

View file

@ -0,0 +1,91 @@
diff --git a/include/openspace/util/distanceconversion.h b/include/openspace/util/distanceconversion.h
index 80a3a96..7059752 100755
--- a/include/openspace/util/distanceconversion.h
+++ b/include/openspace/util/distanceconversion.h
@@ -159,24 +159,34 @@ constexpr const char* nameForDistanceUnit(DistanceUnit unit, bool pluralForm = f
}
constexpr DistanceUnit distanceUnitFromString(const char* unitName) {
+ int result = -1;
+
int i = 0;
for (const char* val : DistanceUnitNamesSingular) {
if (ghoul::equal(unitName, val)) {
- return static_cast<DistanceUnit>(i);
+ result = i;
+ break;
}
++i;
}
- i = 0;
- for (const char* val : DistanceUnitNamesPlural) {
- if (ghoul::equal(unitName, val)) {
- return static_cast<DistanceUnit>(i);
+ if (result == -1) {
+ i = 0;
+ for (const char* val : DistanceUnitNamesPlural) {
+ if (ghoul::equal(unitName, val)) {
+ result = i;
+ break;
+ }
+ ++i;
}
- ++i;
}
- ghoul_assert(false, "Unit name is not a valid name");
- throw ghoul::MissingCaseException();
+ if (result != -1)
+ return static_cast<DistanceUnit>(result);
+ else {
+ ghoul_assert(false, "Unit name is not a valid name");
+ throw ghoul::MissingCaseException();
+ }
}
diff --git a/include/openspace/util/timeconversion.h b/include/openspace/util/timeconversion.h
index a36c92a..699bca9 100755
--- a/include/openspace/util/timeconversion.h
+++ b/include/openspace/util/timeconversion.h
@@ -142,23 +142,32 @@ constexpr const char* nameForTimeUnit(TimeUnit unit, bool pluralForm = false) {
}
constexpr TimeUnit timeUnitFromString(const char* unitName) {
+ int result = -1;
+
int i = 0;
for (const char* val : TimeUnitNamesSingular) {
if (ghoul::equal(unitName, val)) {
- return static_cast<TimeUnit>(i);
+ result = i;
+ break;
}
++i;
}
- i = 0;
- for (const char* val : TimeUnitNamesPlural) {
- if (ghoul::equal(unitName, val)) {
- return static_cast<TimeUnit>(i);
+ if (result == -1) {
+ i = 0;
+ for (const char* val : TimeUnitNamesPlural) {
+ if (ghoul::equal(unitName, val)) {
+ result = i;
+ break;
+ }
+ ++i;
}
- ++i;
}
- throw ghoul::MissingCaseException();
+ if (result != -1)
+ return static_cast<TimeUnit>(result);
+ else
+ throw ghoul::MissingCaseException();
}
std::pair<double, std::string> simplifyTime(double seconds,

View file

@ -0,0 +1,89 @@
{ stdenv, fetchFromGitHub, fetchurl, makeWrapper, cmake
, curl, boost, gdal, glew, soil
, libX11, libXi, libXxf86vm, libXcursor, libXrandr, libXinerama }:
stdenv.mkDerivation rec {
version = "0.11.1";
name = "openspace-${version}";
src = fetchFromGitHub {
owner = "OpenSpace";
repo = "OpenSpace";
rev = "a65eea61a1b8807ce3d69e9925e75f8e3dfb085d";
sha256 = "0msqixf30r0d41xmfmzkdfw6w9jkx2ph5clq8xiwrg1jc3z9q7nv";
fetchSubmodules = true;
};
buildInputs = [
makeWrapper cmake
curl boost gdal glew soil
libX11 libXi libXxf86vm libXcursor libXrandr libXinerama
];
glmPlatformH = fetchurl {
url = "https://raw.githubusercontent.com/g-truc/glm/dd48b56e44d699a022c69155c8672caacafd9e8a/glm/simd/platform.h";
sha256 = "0y91hlbgn5va7ijg5mz823gqkq9hqxl00lwmdwnf8q2g086rplzw";
};
# See <https://github.com/g-truc/glm/issues/726>
prePatch = ''
cp ${glmPlatformH} ext/sgct/include/glm/simd/platform.h
cp ${glmPlatformH} ext/ghoul/ext/glm/glm/simd/platform.h
'';
patches = [
# See <https://github.com/opensgct/sgct/issues/13>
./vrpn.patch
./constexpr.patch
./config.patch
# WARNING: This patch disables some slow torrents in a very dirty way.
./assets.patch
];
bundle = "$out/usr/share/openspace";
preConfigure = ''
cmakeFlagsArray=(
$cmakeFlagsArray
"-DCMAKE_BUILD_TYPE="
"-DCMAKE_INSTALL_PREFIX=${bundle}"
)
'';
preInstall = ''
mkdir -p $out/bin
mkdir -p ${bundle}
'';
postInstall = ''
cp ext/spice/libSpice.so ${bundle}/lib
cp ext/ghoul/ext/lua/libLua.so ${bundle}/lib
'';
postFixup = ''
for bin in ${bundle}/bin/*
do
rpath=$(patchelf --print-rpath $bin)
patchelf --set-rpath $rpath:${bundle}/lib $bin
name=$(basename $bin)
makeWrapper $bin $out/bin/$name --run "cd ${bundle}"
done
'';
meta = {
description = "Open-source astrovisualization project";
longDescription = ''
OpenSpace is open source interactive data visualization software
designed to visualize the entire known universe and portray our
ongoing efforts to investigate the cosmos.
WARNING: This build is not very usable for now.
'';
homepage = https://www.openspaceproject.com/;
license = stdenv.lib.licenses.mit;
platforms = stdenv.lib.platforms.linux;
};
}

View file

@ -0,0 +1,13 @@
diff --git a/ext/sgct/src/deps/vrpn/vrpn_Connection.C b/ext/sgct/src/deps/vrpn/vrpn_Connection.C
index d6ffdc5..f90a2b2 100755
--- a/ext/sgct/src/deps/vrpn/vrpn_Connection.C
+++ b/ext/sgct/src/deps/vrpn/vrpn_Connection.C
@@ -2489,7 +2489,7 @@ static int vrpn_start_server(const char *machine, char *server_name, char *args,
#if defined(sparc) || defined(FreeBSD) || defined(_AIX) || defined(__ANDROID__)
int status; // doesn't exist on sparc_solaris or FreeBSD
#else
- union wait status;
+ int status;
#endif
/* Check to see if they called back yet. */

View file

@ -9,7 +9,7 @@ assert enableGUI -> libGLU_combined != null && xorg != null && fltk != null;
stdenv.mkDerivation rec {
name = "${attr}-${version}";
attr = if enableGUI then "giac-with-xcas" else "giac";
version = "1.4.9-59";
version = "1.4.9-59"; # TODO try to remove preCheck phase on upgrade
src = fetchurl {
url = "https://www-fourier.ujf-grenoble.fr/~parisse/debian/dists/stable/main/source/giac_${version}.tar.gz";
@ -50,6 +50,14 @@ stdenv.mkDerivation rec {
outputs = [ "out" "doc" ];
doCheck = true;
preCheck = ''
# One test in this file fails. That test just tests a part of the pari
# interface that isn't actually used in giac. Of course it would be better
# to only remove that one test, but that would require a patch.
# Removing the whole test set should be good enough for now.
# Upstream report: https://xcas.univ-grenoble-alpes.fr/forum/viewtopic.php?f=4&t=2102#p10326
echo > check/chk_fhan11
'';
enableParallelBuilding = true;

View file

@ -8,11 +8,11 @@ assert withThread -> libpthreadstubs != null;
stdenv.mkDerivation rec {
name = "pari-${version}";
version = "2.9.5";
version = "2.11.0";
src = fetchurl {
url = "https://pari.math.u-bordeaux.fr/pub/pari/unix/${name}.tar.gz";
sha256 = "05z6y5iwdzcdggbrkic9cy9vy9wmk5qxc21cb4lqnbqxnhjihibb";
sha256 = "18f9yj8ffn3dxignbxj1x36771zbxy4js0r18mv6831ymb6cld9q";
};
buildInputs = [
@ -67,8 +67,8 @@ stdenv.mkDerivation rec {
run 3 or 4 times faster.) gp2c currently only understands a subset
of the GP language.
'';
homepage = "http://pari.math.u-bordeaux.fr/";
downloadPage = "http://pari.math.u-bordeaux.fr/download.html";
homepage = http://pari.math.u-bordeaux.fr;
downloadPage = http://pari.math.u-bordeaux.fr/download.html;
license = licenses.gpl2Plus;
maintainers = with maintainers; [ ertes raskin AndersonTorres ];
platforms = platforms.linux ++ platforms.darwin;

View file

@ -1,4 +1,5 @@
{ stdenv, fetchurl, gmp, bison, perl, ncurses, readline, coreutils, pkgconfig
, lib
, autoreconfHook
, file
, flint
@ -9,21 +10,25 @@
}:
stdenv.mkDerivation rec {
name = "singular-${version}${patchVersion}";
version = "4.1.1";
patchVersion = "p1";
name = "singular-${version}";
version = "4.1.1p2";
urlVersion = builtins.replaceStrings [ "." ] [ "-" ] version;
src = fetchurl {
url = "http://www.mathematik.uni-kl.de/ftp/pub/Math/Singular/SOURCES/${urlVersion}/singular-${version}${patchVersion}.tar.gz";
sha256 = "0wvgz7l1b7zkpmim0r3mvv4fp8xnhlbz4c7hc90rn30snlansnf1";
src = let
# singular sorts its tarballs in directories by base release (without patch version)
# for example 4.1.1p1 will be in the directory 4-1-1
baseVersion = builtins.head (lib.splitString "p" version);
urlVersion = builtins.replaceStrings [ "." ] [ "-" ] baseVersion;
in
fetchurl {
url = "http://www.mathematik.uni-kl.de/ftp/pub/Math/Singular/SOURCES/${urlVersion}/singular-${version}.tar.gz";
sha256 = "07x9kri8vl4galik7lr6pscq3c51n8570pyw64i7gbj0m706f7wf";
};
configureFlags = [
"--with-ntl=${ntl}"
] ++stdenv.lib.optionals enableFactory [
] ++ lib.optionals enableFactory [
"--enable-factory"
] ++ stdenv.lib.optionals enableGfanlib [
] ++ lib.optionals enableGfanlib [
"--enable-gfanlib"
];
@ -42,7 +47,7 @@ stdenv.mkDerivation rec {
readline
ntl
flint
] ++ stdenv.lib.optionals enableGfanlib [
] ++ lib.optionals enableGfanlib [
cddlib
];
nativeBuildInputs = [
@ -60,10 +65,12 @@ stdenv.mkDerivation rec {
-i '{}' ';'
'';
hardeningDisable = stdenv.lib.optional stdenv.isi686 "stackprotector";
hardeningDisable = lib.optional stdenv.isi686 "stackprotector";
# The Makefile actually defaults to `make install` anyway
buildPhase = "true;";
buildPhase = ''
# do nothing
'';
installPhase = ''
mkdir -p "$out"
@ -77,7 +84,7 @@ stdenv.mkDerivation rec {
# simple test to make sure singular starts and finds its libraries
doInstallCheck = true;
installCheckPhase = ''
$out/bin/Singular -c 'LIB "freegb.lib"; exit;'
"$out/bin/Singular" -c 'LIB "freegb.lib"; exit;'
if [ $? -ne 0 ]; then
echo >&2 "Error loading the freegb library in Singular."
exit 1
@ -86,9 +93,10 @@ stdenv.mkDerivation rec {
enableParallelBuilding = true;
meta = with stdenv.lib; {
meta = with lib; {
description = "A CAS for polynomial computations";
maintainers = with maintainers; [ raskin ];
maintainers = with maintainers; [ raskin timokau ];
# 32 bit x86 fails with some link error: `undefined reference to `__divmoddi4@GCC_7.0.0'`
platforms = subtractLists platforms.i686 platforms.linux;
license = licenses.gpl3; # Or GPLv2 at your option - but not GPLv4
homepage = http://www.singular.uni-kl.de;

View file

@ -244,6 +244,7 @@ EOF
## InstallCheck
doCheck = false;
doInstallCheck = true;
installCheckTarget = "test";

View file

@ -4,14 +4,14 @@
stdenv.mkDerivation rec {
pname = "tig";
version = "2.3.3";
version = "2.4.0";
name = "${pname}-${version}";
src = fetchFromGitHub {
owner = "jonas";
repo = pname;
rev = name;
sha256 = "1gw5ia6cl5b0q91kv4vfg35my2p49np23aikxqf5gn00zhqrkfap";
sha256 = "1d5clkdgj0ip1j0k335pr4dabcnap6jr016q90i49p1jxixy96pb";
};
nativeBuildInputs = [ makeWrapper autoreconfHook asciidoc xmlto docbook_xsl docbook_xml_dtd_45 findXMLCatalogs pkgconfig ];

View file

@ -7,13 +7,13 @@ with stdenv.lib;
buildGoPackage rec {
name = "gitea-${version}";
version = "1.4.2";
version = "1.4.3";
src = fetchFromGitHub {
owner = "go-gitea";
repo = "gitea";
rev = "v${version}";
sha256 = "15iqvfvijg46444pybi7vg7xhl2x0pr5p1416qlc2nakkn3drpi1";
sha256 = "0rl20dhj3in8w3ngix42qly077zrwg578aa2nxxznmn9k8xdvfpd";
};
patches = [ ./static-root-path.patch ];

View file

@ -10,7 +10,7 @@
libogg, libopus, libtheora, libvorbis, libdvdcss, a52dec,
lame, libdvdread, libdvdnav, libbluray,
mp4v2, mpeg2dec, x264, x265, libmkv,
fontconfig, freetype,
fontconfig, freetype, hicolor-icon-theme,
glib, gtk3, intltool, libnotify,
gst_all_1, dbus-glib, udev, libgudev, libvpx,
useGtk ? true, wrapGAppsHook ? null, libappindicator-gtk3 ? null,
@ -50,7 +50,7 @@ stdenv.mkDerivation rec {
] ++ lib.optionals useGtk [
glib gtk3 libappindicator-gtk3 libnotify
gst_all_1.gstreamer gst_all_1.gst-plugins-base dbus-glib udev
libgudev
libgudev hicolor-icon-theme
] ++ (if useFfmpeg then [ ffmpeg ] else [ patched_libav_12 ])
++ lib.optional useFdk fdk_aac;
@ -82,11 +82,6 @@ stdenv.mkDerivation rec {
cd build
'';
# icon-theme.cache belongs in the icon theme, not in individual packages
postInstall = ''
rm $out/share/icons/hicolor/icon-theme.cache
'';
meta = with stdenv.lib; {
homepage = http://handbrake.fr/;
description = "A tool for converting video files and ripping DVDs";

View file

@ -74,21 +74,21 @@ assert drmSupport -> available libdrm;
let
# Purity: Waf is normally downloaded by bootstrap.py, but
# for purity reasons this behavior should be avoided.
wafVersion = "1.9.15";
wafVersion = "2.0.9";
waf = fetchurl {
urls = [ "https://waf.io/waf-${wafVersion}"
"http://www.freehackers.org/~tnagy/release/waf-${wafVersion}" ];
sha256 = "0qrnlv91cb0v221w8a0fi4wxm99q2hpz10rkyyk4akcsvww6xrw5";
sha256 = "0j7sbn3w6bgslvwwh5v9527w3gi2sd08kskrgxamx693y0b0i3ia";
};
in stdenv.mkDerivation rec {
name = "mpv-${version}";
version = "0.28.2";
version = "0.29.0";
src = fetchFromGitHub {
owner = "mpv-player";
repo = "mpv";
rev = "v${version}";
sha256 = "0bldxhqjz7z9fgvx4k40l49awpay17fscp8ypswb459yicy8npmg";
sha256 = "0i2nl65diqsjyz28dj07h6d8gq6ix72ysfm0nhs8514hqccaihs3";
};
postPatch = ''

View file

@ -185,6 +185,8 @@ stdenv.mkDerivation {
"mips64" = "btsmip";
"mips64el" = "ltsmip";
}.${targetPlatform.parsed.cpu.name}
else if targetPlatform.isPowerPC then "powerpc"
else if targetPlatform.isSparc then "sparc"
else throw "unknown emulation for platform: " + targetPlatform.config;
in targetPlatform.platform.bfdEmulation or (fmt + sep + arch);

View file

@ -20,7 +20,13 @@ bintoolsWrapper_addLDVars () {
fi
if [[ -d "$1/lib" ]]; then
export NIX_${role_pre}LDFLAGS+=" -L$1/lib"
# Don't add the /lib directory if it actually doesn't contain any libraries. For instance,
# Python and Haskell packages often only have directories like $out/lib/ghc-8.4.3/ or
# $out/lib/python3.6/, so having them in LDFLAGS just makes the linker search unnecessary
# directories and bloats the size of the environment variable space.
if [[ -n "$(echo $1/lib/lib*)" ]]; then
export NIX_${role_pre}LDFLAGS+=" -L$1/lib"
fi
fi
}

View file

@ -16,10 +16,11 @@ infoFile: let
script = writeText "build-maven-repository.sh" ''
${lib.concatStrings (map (dep: let
inherit (dep)
url sha1 groupId artifactId version
authenticated metadata repository-id;
url sha1 groupId artifactId
version metadata repository-id;
versionDir = dep.unresolved-version or version;
authenticated = dep.authenticated or false;
fetch = (if authenticated then requireFile else fetchurl) {
inherit url sha1;

View file

@ -36,10 +36,11 @@ rec {
in
{ imageName
# To find the digest of an image, you can use skopeo:
# skopeo inspect docker://docker.io/nixos/nix:1.11 | jq -r '.Digest'
# sha256:20d9485b25ecfd89204e843a962c1bd70e9cc6858d65d7f5fadc340246e2116b
# see doc/functions.xml
, imageDigest
, sha256
, os ? "linux"
, arch ? "x86_64"
# This used to set a tag to the pulled image
, finalImageTag ? "latest"
, name ? fixName "docker-image-${imageName}-${finalImageTag}.tar"
@ -59,7 +60,7 @@ rec {
sourceURL = "docker://${imageName}@${imageDigest}";
destNameTag = "${imageName}:${finalImageTag}";
} ''
skopeo copy "$sourceURL" "docker-archive://$out:$destNameTag"
skopeo --override-os ${os} --override-arch ${arch} copy "$sourceURL" "docker-archive://$out:$destNameTag"
'';
# We need to sum layer.tar, not a directory, hence tarsum instead of nix-hash.

View file

@ -5,7 +5,15 @@
with lib;
{ pname
{ /*
pname: Nix package name without special symbols and without version or
"emacs-" prefix.
*/
pname
/*
ename: Original Emacs package name, possibly containing special symbols.
*/
, ename ? null
, version
, recipe
, meta ? {}
@ -22,6 +30,11 @@ in
import ./generic.nix { inherit lib stdenv emacs texinfo; } ({
ename =
if isNull(ename)
then pname
else ename;
melpa = fetchFromGitHub {
owner = "melpa";
repo = "melpa";
@ -35,7 +48,7 @@ import ./generic.nix { inherit lib stdenv emacs texinfo; } ({
preUnpack = ''
mkdir -p "$NIX_BUILD_TOP/recipes"
if [ -n "$recipe" ]; then
cp "$recipe" "$NIX_BUILD_TOP/recipes/$pname"
cp "$recipe" "$NIX_BUILD_TOP/recipes/$ename"
fi
ln -s "$melpa/package-build" "$NIX_BUILD_TOP/package-build"
@ -45,7 +58,7 @@ import ./generic.nix { inherit lib stdenv emacs texinfo; } ({
postUnpack = ''
mkdir -p "$NIX_BUILD_TOP/working"
ln -s "$NIX_BUILD_TOP/$sourceRoot" "$NIX_BUILD_TOP/working/$pname"
ln -s "$NIX_BUILD_TOP/$sourceRoot" "$NIX_BUILD_TOP/working/$ename"
'';
buildPhase =
@ -58,7 +71,7 @@ import ./generic.nix { inherit lib stdenv emacs texinfo; } ({
-L "$melpa/package-build" \
-l "$melpa2nix" \
-f melpa2nix-build-package \
$pname $version
$ename $version
runHook postBuild
'';
@ -66,9 +79,9 @@ import ./generic.nix { inherit lib stdenv emacs texinfo; } ({
installPhase = ''
runHook preInstall
archive="$NIX_BUILD_TOP/packages/$pname-$version.el"
archive="$NIX_BUILD_TOP/packages/$ename-$version.el"
if [ ! -f "$archive" ]; then
archive="$NIX_BUILD_TOP/packages/$pname-$version.tar"
archive="$NIX_BUILD_TOP/packages/$ename-$version.tar"
fi
emacs --batch -Q \

View file

@ -0,0 +1 @@
postFixupHooks+=

View file

@ -1,5 +1,4 @@
{ stdenv, fetchurl, pkgconfig, dbus-glib, glib, ORBit2, libxml2
, polkit, intltool }:
{ stdenv, fetchurl, pkgconfig, dbus-glib, glib, ORBit2, libxml2, polkit, python2, intltool }:
stdenv.mkDerivation rec {
name = "gconf-${version}";
@ -12,7 +11,7 @@ stdenv.mkDerivation rec {
outputs = [ "out" "dev" "man" ];
buildInputs = [ ORBit2 libxml2 ]
buildInputs = [ ORBit2 libxml2 python2 ]
# polkit requires pam, which requires shadow.h, which is not available on
# darwin
++ stdenv.lib.optional (!stdenv.isDarwin) polkit;

View file

@ -1,6 +1,5 @@
{ stdenv, fetchurl, fetchpatch, pkgconfig, bison, flex, intltool, gtk, libical, dbus-glib, tzdata
, libnotify, popt, xfce
}:
, libnotify, popt, xfce, hicolor-icon-theme }:
stdenv.mkDerivation rec {
name = "${p_name}-${ver_maj}.${ver_min}";
@ -35,8 +34,6 @@ stdenv.mkDerivation rec {
buildInputs = [ gtk libical dbus-glib libnotify popt xfce.libxfce4util
xfce.xfce4-panel ];
preFixup = "rm $out/share/icons/hicolor/icon-theme.cache ";
meta = {
homepage = http://www.xfce.org/projects/;
description = "A simple calendar application with reminders";

View file

@ -1,5 +1,5 @@
{ stdenv, fetchurl, pkgconfig, intltool, libnotify
, gtk , libxfce4util, libxfce4ui, xfconf }:
, gtk , libxfce4util, libxfce4ui, xfconf, hicolor-icon-theme }:
stdenv.mkDerivation rec {
p_name = "xfce4-notifyd";
@ -13,10 +13,9 @@ stdenv.mkDerivation rec {
name = "${p_name}-${ver_maj}.${ver_min}";
nativeBuildInputs = [ pkgconfig ];
buildInputs = [ intltool libnotify gtk libxfce4util libxfce4ui xfconf ];
buildInputs = [ intltool libnotify gtk libxfce4util libxfce4ui xfconf hicolor-icon-theme ];
preFixup = ''
rm $out/share/icons/hicolor/icon-theme.cache
# to be able to run the daemon we need it in PATH
ln -rs $out/lib/xfce4/notifyd/xfce4-notifyd $out/bin
'';

View file

@ -1,6 +1,6 @@
{ stdenv, fetchurl, pkgconfig, intltool
, gtk, dbus-glib, libstartup_notification, libnotify, libexif, pcre, udev
, exo, libxfce4util, xfconf, xfce4-panel, wrapGAppsHook
, exo, libxfce4util, xfconf, xfce4-panel, hicolor-icon-theme, wrapGAppsHook
}:
stdenv.mkDerivation rec {
@ -26,13 +26,12 @@ stdenv.mkDerivation rec {
intltool
gtk dbus-glib libstartup_notification libnotify libexif pcre udev
exo libxfce4util xfconf xfce4-panel
hicolor-icon-theme
];
# TODO: optionality?
enableParallelBuilding = true;
preFixup = "rm $out/share/icons/hicolor/icon-theme.cache";
meta = {
homepage = http://thunar.xfce.org/;
description = "Xfce file manager";

Some files were not shown because too many files have changed in this diff Show more