Merge staging-next into staging

This commit is contained in:
Frederik Rietdijk 2020-01-15 09:23:28 +01:00
commit 2a88c3c302
163 changed files with 2986 additions and 913 deletions

View file

@ -833,6 +833,7 @@ used in `buildPythonPackage`.
- `pythonRemoveBinBytecode` to remove bytecode from the `/bin` folder.
- `setuptoolsBuildHook` to build a wheel using `setuptools`.
- `setuptoolsCheckHook` to run tests with `python setup.py test`.
- `venvShellHook` to source a Python 3 `venv` at the `venvDir` location. A `venv` is created if it does not yet exist.
- `wheelUnpackHook` to move a wheel to the correct folder so it can be installed with the `pipInstallHook`.
### Development mode

View file

@ -32,17 +32,17 @@ Rust applications are packaged by using the `buildRustPackage` helper from `rust
```
rustPlatform.buildRustPackage rec {
name = "ripgrep-${version}";
version = "0.4.0";
pname = "ripgrep";
version = "11.0.2";
src = fetchFromGitHub {
owner = "BurntSushi";
repo = "ripgrep";
rev = "${version}";
sha256 = "0y5d1n6hkw85jb3rblcxqas2fp82h3nghssa4xqrhqnz25l799pj";
repo = pname;
rev = version;
sha256 = "1iga3320mgi7m853la55xip514a3chqsdi1a1rwv25lr9b1p7vd3";
};
cargoSha256 = "0q68qyl2h6i0qsz82z840myxlnjay8p1w5z7hfyr8fqp7wgwa9cx";
cargoSha256 = "17ldqr3asrdcsh4l29m3b5r37r5d0b3npq1lrgjmxb6vlx6a36qh";
verifyCargoDeps = true;
meta = with stdenv.lib; {
@ -66,7 +66,11 @@ added in `cargoPatches` will also be prepended to the patches in `patches` at
build-time.
When `verifyCargoDeps` is set to `true`, the build will also verify that the
`cargoSha256` is not out of date by comparing the `Cargo.lock` file in both the `cargoDeps` and `src`. Note that this option changes the value of `cargoSha256` since it also copies the `Cargo.lock` in it. To avoid breaking backward-compatibility this option is not enabled by default but hopefully will be in the future.
`cargoSha256` is not out of date by comparing the `Cargo.lock` file in both the
`cargoDeps` and `src`. Note that this option changes the value of `cargoSha256`
since it also copies the `Cargo.lock` in it. To avoid breaking
backward-compatibility this option is not enabled by default but hopefully will
be in the future.
### Building a crate for a different target

View file

@ -1,9 +1,22 @@
.docbook .xref img[src^=images\/callouts\/],
.screen img,
.programlisting img {
.programlisting img,
.literallayout img,
.synopsis img {
width: 1em;
}
.calloutlist img {
width: 1.5em;
}
.prompt,
.screen img,
.programlisting img,
.literallayout img,
.synopsis img {
-moz-user-select: none;
-webkit-user-select: none;
-ms-user-select: none;
user-select: none;
}

56
lib/cli.nix Normal file
View file

@ -0,0 +1,56 @@
{ lib }:
rec {
/* Automatically convert an attribute set to command-line options.
This helps protect against malformed command lines and also to reduce
boilerplate related to command-line construction for simple use cases.
Example:
encodeGNUCommandLine
{ }
{ data = builtins.toJSON { id = 0; };
X = "PUT";
retry = 3;
retry-delay = null;
url = [ "https://example.com/foo" "https://example.com/bar" ];
silent = false;
verbose = true;
};
=> "'-X' 'PUT' '--data' '{\"id\":0}' '--retry' '3' '--url' 'https://example.com/foo' '--url' 'https://example.com/bar' '--verbose'"
*/
encodeGNUCommandLine =
options: attrs: lib.escapeShellArgs (toGNUCommandLine options attrs);
toGNUCommandLine =
{ renderKey ?
key: if builtins.stringLength key == 1 then "-${key}" else "--${key}"
, renderOption ?
key: value:
if value == null
then []
else [ (renderKey key) (builtins.toString value) ]
, renderBool ? key: value: lib.optional value (renderKey key)
, renderList ? key: value: lib.concatMap (renderOption key) value
}:
options:
let
render = key: value:
if builtins.isBool value
then renderBool key value
else if builtins.isList value
then renderList key value
else renderOption key value;
in
builtins.concatLists (lib.mapAttrsToList render options);
}

View file

@ -39,6 +39,7 @@ let
# misc
asserts = callLibs ./asserts.nix;
cli = callLibs ./cli.nix;
debug = callLibs ./debug.nix;
generators = callLibs ./generators.nix;
misc = callLibs ./deprecated.nix;
@ -100,7 +101,7 @@ let
inherit (sources) pathType pathIsDirectory cleanSourceFilter
cleanSource sourceByRegex sourceFilesBySuffices
commitIdFromGitRepo cleanSourceWith pathHasContext
canCleanSource;
canCleanSource pathIsRegularFile;
inherit (modules) evalModules unifyModuleSyntax
applyIfFunction mergeModules
mergeModules' mergeOptionDecls evalOptionValue mergeDefinitions
@ -120,6 +121,7 @@ let
isOptionType mkOptionType;
inherit (asserts)
assertMsg assertOneOf;
inherit (cli) encodeGNUCommandLine toGNUCommandLine;
inherit (debug) addErrorContextToAttrs traceIf traceVal traceValFn
traceXMLVal traceXMLValMarked traceSeq traceSeqN traceValSeq
traceValSeqFn traceValSeqN traceValSeqNFn traceShowVal

View file

@ -9,6 +9,9 @@ rec {
# Returns true if the path exists and is a directory, false otherwise
pathIsDirectory = p: if builtins.pathExists p then (pathType p) == "directory" else false;
# Returns true if the path exists and is a regular file, false otherwise
pathIsRegularFile = p: if builtins.pathExists p then (pathType p) == "regular" else false;
# Bring in a path as a source, filtering out all Subversion and CVS
# directories, as well as backup files (*~).
cleanSourceFilter = name: type: let baseName = baseNameOf (toString name); in ! (
@ -110,24 +113,43 @@ rec {
with builtins;
let fileName = toString path + "/" + file;
packedRefsName = toString path + "/packed-refs";
in if lib.pathExists fileName
in if pathIsRegularFile path
# Resolve git worktrees. See gitrepository-layout(5)
then
let m = match "^gitdir: (.*)$" (lib.fileContents path);
in if m == null
then throw ("File contains no gitdir reference: " + path)
else
let gitDir = lib.head m;
commonDir' = if pathIsRegularFile "${gitDir}/commondir"
then lib.fileContents "${gitDir}/commondir"
else gitDir;
commonDir = if lib.hasPrefix "/" commonDir'
then commonDir'
else toString (/. + "${gitDir}/${commonDir'}");
refFile = lib.removePrefix "${commonDir}/" "${gitDir}/${file}";
in readCommitFromFile refFile commonDir
else if pathIsRegularFile fileName
# Sometimes git stores the commitId directly in the file but
# sometimes it stores something like: «ref: refs/heads/branch-name»
then
let fileContent = lib.fileContents fileName;
# Sometimes git stores the commitId directly in the file but
# sometimes it stores something like: «ref: refs/heads/branch-name»
matchRef = match "^ref: (.*)$" fileContent;
in if matchRef == null
in if matchRef == null
then fileContent
else readCommitFromFile (lib.head matchRef) path
else if pathIsRegularFile packedRefsName
# Sometimes, the file isn't there at all and has been packed away in the
# packed-refs file, so we have to grep through it:
else if lib.pathExists packedRefsName
then
let fileContent = readFile packedRefsName;
matchRef = match (".*\n([^\n ]*) " + file + "\n.*") fileContent;
in if matchRef == null
in if matchRef == null
then throw ("Could not find " + file + " in " + packedRefsName)
else lib.head matchRef
else throw ("Not a .git directory: " + path);
in readCommitFromFile "HEAD";

View file

@ -441,4 +441,25 @@ runTests {
expected = "«foo»";
};
testRenderOptions = {
expr =
encodeGNUCommandLine
{ }
{ data = builtins.toJSON { id = 0; };
X = "PUT";
retry = 3;
retry-delay = null;
url = [ "https://example.com/foo" "https://example.com/bar" ];
silent = false;
verbose = true;
};
expected = "'-X' 'PUT' '--data' '{\"id\":0}' '--retry' '3' '--url' 'https://example.com/foo' '--url' 'https://example.com/bar' '--verbose'";
};
}

View file

@ -174,8 +174,7 @@ checkConfigOutput "true" config.submodule.inner ./declare-submoduleWith-modules.
checkConfigOutput "true" config.submodule.outer ./declare-submoduleWith-modules.nix
## Paths should be allowed as values and work as expected
# Temporarily disabled until https://github.com/NixOS/nixpkgs/pull/76861
#checkConfigOutput "true" config.submodule.enable ./declare-submoduleWith-path.nix
checkConfigOutput "true" config.submodule.enable ./declare-submoduleWith-path.nix
# Check that disabledModules works recursively and correctly
checkConfigOutput "true" config.enable ./disable-recursive/main.nix

View file

@ -191,7 +191,7 @@ rec {
let
revisionFile = "${toString ./..}/.git-revision";
gitRepo = "${toString ./..}/.git";
in if lib.pathIsDirectory gitRepo
in if builtins.pathExists gitRepo
then lib.commitIdFromGitRepo gitRepo
else if lib.pathExists revisionFile then lib.fileContents revisionFile
else default;

View file

@ -340,18 +340,68 @@ rec {
let
padWidth = stringLength (toString (length def.value));
unnamed = i: unnamedPrefix + fixedWidthNumber padWidth i;
anyString = placeholder "name";
nameAttrs = [
{ path = [ "environment" "etc" ];
name = "target";
}
{ path = [ "containers" anyString "bindMounts" ];
name = "mountPoint";
}
{ path = [ "programs" "ssh" "knownHosts" ];
# hostNames is actually a list so we would need to handle it only when singleton
name = "hostNames";
}
{ path = [ "fileSystems" ];
name = "mountPoint";
}
{ path = [ "boot" "specialFileSystems" ];
name = "mountPoint";
}
{ path = [ "services" "znapzend" "zetup" ];
name = "dataset";
}
{ path = [ "services" "znapzend" "zetup" anyString "destinations" ];
name = "label";
}
{ path = [ "services" "geoclue2" "appConfig" ];
name = "desktopID";
}
];
matched = let
equals = a: b: b == anyString || a == b;
fallback = { name = "name"; };
in findFirst ({ path, ... }: all (v: v == true) (zipListsWith equals loc path)) fallback nameAttrs;
nameAttr = matched.name;
nameValueOld = value:
if isList value then
if length value > 0 then
"[ " + concatMapStringsSep " " escapeNixString value + " ]"
else
"[ ]"
else
escapeNixString value;
nameValueNew = value: unnamed:
if isList value then
if length value > 0 then
head value
else
unnamed
else
value;
res =
{ inherit (def) file;
value = listToAttrs (
imap1 (elemIdx: elem:
{ name = elem.name or (unnamed elemIdx);
{ name = nameValueNew (elem.${nameAttr} or (unnamed elemIdx)) (unnamed elemIdx);
value = elem;
}) def.value);
};
option = concatStringsSep "." loc;
sample = take 3 def.value;
list = concatMapStrings (x: ''{ name = "${x.name or "unnamed"}"; ...} '') sample;
set = concatMapStrings (x: ''${x.name or "unnamed"} = {...}; '') sample;
more = lib.optionalString (length def.value > 3) "... ";
list = concatMapStrings (x: ''{ ${nameAttr} = ${nameValueOld (x.${nameAttr} or "unnamed")}; ...} '') sample;
set = concatMapStrings (x: ''${nameValueNew (x.${nameAttr} or "unnamed") "unnamed"} = {...}; '') sample;
msg = ''
In file ${def.file}
a list is being assigned to the option config.${option}.
@ -359,10 +409,10 @@ rec {
See https://git.io/fj2zm for more information.
Do
${option} =
{ ${set}...}
{ ${set}${more}}
instead of
${option} =
[ ${list}...]
[ ${list}${more}]
'';
in
lib.warn msg res
@ -430,14 +480,16 @@ rec {
else unify (if shorthandOnlyDefinesConfig then { config = value; } else value);
allModules = defs: modules ++ imap1 (n: { value, file }:
# Annotate the value with the location of its definition for better error messages
coerce (lib.modules.unifyModuleSyntax file "${toString file}-${toString n}") value
if isAttrs value || isFunction value then
# Annotate the value with the location of its definition for better error messages
coerce (lib.modules.unifyModuleSyntax file "${toString file}-${toString n}") value
else value
) defs;
in
mkOptionType rec {
name = "submodule";
check = x: isAttrs x || isFunction x;
check = x: isAttrs x || isFunction x || path.check x;
merge = loc: defs:
(evalModules {
modules = allModules defs;
@ -538,7 +590,7 @@ rec {
tail' = tail ts;
in foldl' either head' tail';
# Either value of type `finalType` or `coercedType`, the latter is
# Either value of type `coercedType` or `finalType`, the former is
# converted to `finalType` using `coerceFunc`.
coercedTo = coercedType: coerceFunc: finalType:
assert lib.assertMsg (coercedType.getSubModules == null)
@ -547,12 +599,12 @@ rec {
mkOptionType rec {
name = "coercedTo";
description = "${finalType.description} or ${coercedType.description} convertible to it";
check = x: finalType.check x || (coercedType.check x && finalType.check (coerceFunc x));
check = x: (coercedType.check x && finalType.check (coerceFunc x)) || finalType.check x;
merge = loc: defs:
let
coerceVal = val:
if finalType.check val then val
else coerceFunc val;
if coercedType.check val then coerceFunc val
else val;
in finalType.merge loc (map (def: def // { value = coerceVal def.value; }) defs);
emptyValue = finalType.emptyValue;
getSubOptions = finalType.getSubOptions;

View file

@ -505,6 +505,12 @@
githubId = 750786;
name = "Justin Wood";
};
anmonteiro = {
email = "anmonteiro@gmail.com";
github = "anmonteiro";
githubId = 661909;
name = "Antonio Nuno Monteiro";
};
anpryl = {
email = "anpryl@gmail.com";
github = "anpryl";
@ -2433,6 +2439,12 @@
githubId = 844574;
name = "Daniel Austin";
};
flyfloh = {
email = "nix@halbmastwurf.de";
github = "flyfloh";
githubId = 74379;
name = "Florian Pester";
};
fmthoma = {
email = "f.m.thoma@googlemail.com";
github = "fmthoma";
@ -4430,6 +4442,12 @@
githubId = 158568;
name = "Matthias C. M. Troffaes";
};
McSinyx = {
email = "vn.mcsinyx@gmail.com";
github = "McSinyx";
githubId = 13689192;
name = "Nguyn Gia Phong";
};
mdaiter = {
email = "mdaiter8121@gmail.com";
github = "mdaiter";
@ -5070,6 +5088,12 @@
githubId = 7588406;
name = "Andrew R. M.";
};
nloomans = {
email = "noah@nixos.noahloomans.com";
github = "nloomans";
githubId = 7829481;
name = "Noah Loomans";
};
nmattia = {
email = "nicolas@nmattia.com";
github = "nmattia";
@ -7014,6 +7038,11 @@
github = "timbertson";
name = "Tim Cuthbertson";
};
timma = {
email = "kunduru.it.iitb@gmail.com";
github = "ktrsoft";
name = "Timma";
};
timokau = {
email = "timokau@zoho.com";
github = "timokau";

View file

@ -257,9 +257,9 @@
<listitem>
<para>
A set of sub options <replaceable>o</replaceable>.
<replaceable>o</replaceable> can be an attribute set or a function
returning an attribute set. Submodules are used in composed types to
create modular options. This is equivalent to
<replaceable>o</replaceable> can be an attribute set, a function
returning an attribute set, or a path to a file containing such a value. Submodules are used in
composed types to create modular options. This is equivalent to
<literal>types.submoduleWith { modules = toList o; shorthandOnlyDefinesConfig = true; }</literal>.
Submodules are detailed in
<xref

View file

@ -6,7 +6,7 @@
<author><personname><firstname>Eelco</firstname><surname>Dolstra</surname></personname>
<contrib>Author</contrib>
</author>
<copyright><year>2007-2019</year><holder>Eelco Dolstra</holder>
<copyright><year>2007-2020</year><holder>Eelco Dolstra</holder>
</copyright>
</info>
<xi:include href="man-configuration.xml" />

View file

@ -391,6 +391,16 @@ users.users.me =
<link xlink:href="https://github.com/NixOS/nixpkgs/pull/63103">PR #63103</link>.
</para>
</listitem>
<listitem>
<para>
For NixOS modules, the types <literal>types.submodule</literal> and <literal>types.submoduleWith</literal> now support
paths as allowed values, similar to how <literal>imports</literal> supports paths.
Because of this, if you have a module that defines an option of type
<literal>either (submodule ...) path</literal>, it will break since a path
is now treated as the first type instead of the second. To fix this, change
the type to <literal>either path (submodule ...)</literal>.
</para>
</listitem>
</itemizedlist>
</section>

View file

@ -704,7 +704,8 @@ class Machine:
def process_serial_output() -> None:
for _line in self.process.stdout:
line = _line.decode("unicode_escape").replace("\r", "").rstrip()
# Ignore undecodable bytes that may occur in boot menus
line = _line.decode(errors="ignore").replace("\r", "").rstrip()
eprint("{} # {}".format(self.name, line))
self.logger.enqueue({"msg": line, "machine": self.name})

View file

@ -155,7 +155,7 @@ in rec {
--add-flags "''${vms[*]}" \
${lib.optionalString enableOCR
"--prefix PATH : '${ocrProg}/bin:${imagemagick_tiff}/bin'"} \
--run "export testScript=\"\$(cat $out/test-script)\"" \
--run "export testScript=\"\$(${coreutils}/bin/cat $out/test-script)\"" \
--set VLANS '${toString vlans}'
ln -s ${testDriver}/bin/nixos-test-driver $out/bin/nixos-run-vms
wrapProgram $out/bin/nixos-run-vms \

View file

@ -21,6 +21,19 @@ with lib;
###### implementation
config = mkIf config.hardware.usbWwan.enable {
# Attaches device specific handlers.
services.udev.packages = with pkgs; [ usb-modeswitch-data ];
# Triggered by udev, usb-modeswitch creates systemd services via a
# template unit in the usb-modeswitch package.
systemd.packages = with pkgs; [ usb-modeswitch ];
# The systemd service requires the usb-modeswitch-data. The
# usb-modeswitch package intends to discover this via the
# filesystem at /usr/share/usb_modeswitch, and merge it with user
# configuration in /etc/usb_modeswitch.d. Configuring the correct
# path in the package is difficult, as it would cause a cyclic
# dependency.
environment.etc."usb_modeswitch.d".source = "${pkgs.usb-modeswitch-data}/share/usb_modeswitch";
};
}

View file

@ -91,8 +91,8 @@ in
# These defaults are set here rather than up there so that
# changing them would not rebuild the manual
version = mkDefault (cfg.release + cfg.versionSuffix);
revision = mkIf (pathIsDirectory gitRepo) (mkDefault gitCommitId);
versionSuffix = mkIf (pathIsDirectory gitRepo) (mkDefault (".git." + gitCommitId));
revision = mkIf (pathExists gitRepo) (mkDefault gitCommitId);
versionSuffix = mkIf (pathExists gitRepo) (mkDefault (".git." + gitCommitId));
};
# Generate /etc/os-release. See

View file

@ -735,6 +735,7 @@
./services/networking/wicd.nix
./services/networking/wireguard.nix
./services/networking/wpa_supplicant.nix
./services/networking/xandikos.nix
./services/networking/xinetd.nix
./services/networking/xl2tpd.nix
./services/networking/xrdp.nix

View file

@ -222,7 +222,7 @@ in {
};
config = mkIf cfg.enable {
users.groups = optional (cfg.group == "buildbot") {
users.groups = optionalAttrs (cfg.group == "buildbot") {
buildbot = { };
};

View file

@ -136,7 +136,7 @@ in {
config = mkIf cfg.enable {
services.buildbot-worker.workerPassFile = mkDefault (pkgs.writeText "buildbot-worker-password" cfg.workerPass);
users.groups = optional (cfg.group == "bbworker") {
users.groups = optionalAttrs (cfg.group == "bbworker") {
bbworker = { };
};

View file

@ -50,7 +50,7 @@ in {
};
config = mkIf (cfg.enable && !masterCfg.enable) {
users.groups = optional (cfg.group == "jenkins") {
users.groups = optionalAttrs (cfg.group == "jenkins") {
jenkins.gid = config.ids.gids.jenkins;
};

View file

@ -259,6 +259,8 @@ in
${openldap.out}/bin/slapadd ${configOpts} -l ${dataFile}
''}
chown -R "${cfg.user}:${cfg.group}" "${cfg.dataDir}"
${openldap}/bin/slaptest ${configOpts}
'';
serviceConfig.ExecStart =
"${openldap.out}/libexec/slapd -d '${cfg.logLevel}' " +

View file

@ -51,7 +51,7 @@ in
};
};
users.groups = optional (cfg.group == defaultUserGroup) {
users.groups = optionalAttrs (cfg.group == defaultUserGroup) {
${cfg.group} = { };
};

View file

@ -612,10 +612,7 @@ in
{
environment = {
etc = singleton
{ source = "/var/lib/postfix/conf";
target = "postfix";
};
etc.postfix.source = "/var/lib/postfix/conf";
# This makes it comfortable to run 'postqueue/postdrop' for example.
systemPackages = [ pkgs.postfix ];

View file

@ -124,7 +124,7 @@ in
# Allow users to run 'spamc'.
environment = {
etc = singleton { source = spamdEnv; target = "spamassassin"; };
etc.spamassassin.source = spamdEnv;
systemPackages = [ pkgs.spamassassin ];
};

View file

@ -364,7 +364,7 @@ in
''}
sed -e "s,#secretkey#,$KEY,g" \
-e "s,#dbpass#,$DBPASS,g" \
-e "s,#jwtsecet#,$JWTSECET,g" \
-e "s,#jwtsecret#,$JWTSECRET,g" \
-e "s,#mailerpass#,$MAILERPASSWORD,g" \
-i ${runConfig}
chmod 640 ${runConfig} ${secretKey} ${jwtSecret}

View file

@ -123,9 +123,9 @@ in
config = mkIf cfg.enable {
systemd.tmpfiles.rules = [
"d '${cfg.dataDir}' - ${cfg.user} ${cfg.user} - -"
"d '${cfg.dataDir}' - ${cfg.user} ${config.users.users.${cfg.user}.group} - -"
] ++ (optional cfg.consumptionDirIsPublic
"d '${cfg.consumptionDir}' 777 ${cfg.user} ${cfg.user} - -"
"d '${cfg.consumptionDir}' 777 - - - -"
# If the consumption dir is not created here, it's automatically created by
# 'manage' with the default permissions.
);
@ -169,17 +169,15 @@ in
};
users = optionalAttrs (cfg.user == defaultUser) {
users = [{
name = defaultUser;
users.${defaultUser} = {
group = defaultUser;
uid = config.ids.uids.paperless;
home = cfg.dataDir;
}];
};
groups = [{
name = defaultUser;
groups.${defaultUser} = {
gid = config.ids.gids.paperless;
}];
};
};
};
}

View file

@ -161,7 +161,25 @@ in {
documentation = [ "man:ndppd(1)" "man:ndppd.conf(5)" ];
after = [ "network-pre.target" ];
wantedBy = [ "multi-user.target" ];
serviceConfig.ExecStart = "${pkgs.ndppd}/bin/ndppd -c ${ndppdConf}";
serviceConfig = {
ExecStart = "${pkgs.ndppd}/bin/ndppd -c ${ndppdConf}";
# Sandboxing
CapabilityBoundingSet = "CAP_NET_RAW CAP_NET_ADMIN";
ProtectSystem = "strict";
ProtectHome = true;
PrivateTmp = true;
PrivateDevices = true;
ProtectKernelTunables = true;
ProtectKernelModules = true;
ProtectControlGroups = true;
RestrictAddressFamilies = "AF_INET6 AF_PACKET AF_NETLINK";
RestrictNamespaces = true;
LockPersonality = true;
MemoryDenyWriteExecute = true;
RestrictRealtime = true;
RestrictSUIDSGID = true;
};
};
};
}

View file

@ -233,6 +233,7 @@ in {
path = [ pkgs.wpa_supplicant ];
script = ''
iface_args="-s -u -D${cfg.driver} -c ${configFile}"
${if ifaces == [] then ''
for i in $(cd /sys/class/net && echo *); do
DEVTYPE=
@ -240,14 +241,14 @@ in {
if [ -e "$UEVENT_PATH" ]; then
source "$UEVENT_PATH"
if [ "$DEVTYPE" = "wlan" -o -e /sys/class/net/$i/wireless ]; then
ifaces="$ifaces''${ifaces:+ -N} -i$i"
args+="''${args:+ -N} -i$i $iface_args"
fi
fi
done
'' else ''
ifaces="${concatStringsSep " -N " (map (i: "-i${i}") ifaces)}"
args="${concatMapStringsSep " -N " (i: "-i${i} $iface_args") ifaces}"
''}
exec wpa_supplicant -s -u -D${cfg.driver} -c ${configFile} $ifaces
exec wpa_supplicant $args
'';
};

View file

@ -0,0 +1,148 @@
{ config, lib, pkgs, ... }:
with lib;
let
cfg = config.services.xandikos;
in
{
options = {
services.xandikos = {
enable = mkEnableOption "Xandikos CalDAV and CardDAV server";
package = mkOption {
type = types.package;
default = pkgs.xandikos;
defaultText = "pkgs.xandikos";
description = "The Xandikos package to use.";
};
address = mkOption {
type = types.str;
default = "localhost";
description = ''
The IP address on which Xandikos will listen.
By default listens on localhost.
'';
};
port = mkOption {
type = types.port;
default = 8080;
description = "The port of the Xandikos web application";
};
routePrefix = mkOption {
type = types.str;
default = "/";
description = ''
Path to Xandikos.
Useful when Xandikos is behind a reverse proxy.
'';
};
extraOptions = mkOption {
default = [];
type = types.listOf types.str;
example = literalExample ''
[ "--autocreate"
"--defaults"
"--current-user-principal user"
"--dump-dav-xml"
]
'';
description = ''
Extra command line arguments to pass to xandikos.
'';
};
nginx = mkOption {
default = {};
description = ''
Configuration for nginx reverse proxy.
'';
type = types.submodule {
options = {
enable = mkOption {
type = types.bool;
default = false;
description = ''
Configure the nginx reverse proxy settings.
'';
};
hostName = mkOption {
type = types.str;
description = ''
The hostname use to setup the virtualhost configuration
'';
};
};
};
};
};
};
config = mkIf cfg.enable (
mkMerge [
{
meta.maintainers = [ lib.maintainers."0x4A6F" ];
systemd.services.xandikos = {
description = "A Simple Calendar and Contact Server";
after = [ "network.target" ];
wantedBy = [ "multi-user.target" ];
serviceConfig = {
User = "xandikos";
Group = "xandikos";
DynamicUser = "yes";
RuntimeDirectory = "xandikos";
StateDirectory = "xandikos";
StateDirectoryMode = "0700";
PrivateDevices = true;
# Sandboxing
CapabilityBoundingSet = "CAP_NET_RAW CAP_NET_ADMIN";
ProtectSystem = "strict";
ProtectHome = true;
PrivateTmp = true;
ProtectKernelTunables = true;
ProtectKernelModules = true;
ProtectControlGroups = true;
RestrictAddressFamilies = "AF_INET AF_INET6 AF_UNIX AF_PACKET AF_NETLINK";
RestrictNamespaces = true;
LockPersonality = true;
MemoryDenyWriteExecute = true;
RestrictRealtime = true;
RestrictSUIDSGID = true;
ExecStart = ''
${cfg.package}/bin/xandikos \
--directory /var/lib/xandikos \
--listen_address ${cfg.address} \
--port ${toString cfg.port} \
--route-prefix ${cfg.routePrefix} \
${lib.concatStringsSep " " cfg.extraOptions}
'';
};
};
}
(
mkIf cfg.nginx.enable {
services.nginx = {
enable = true;
virtualHosts."${cfg.nginx.hostName}" = {
locations."/" = {
proxyPass = "http://${cfg.address}:${toString cfg.port}/";
};
};
};
}
)
]
);
}

View file

@ -113,7 +113,7 @@ in
otherCert = "/var/certmgr/specs/other-cert.json";
}
'';
type = with types; attrsOf (either (submodule {
type = with types; attrsOf (either path (submodule {
options = {
service = mkOption {
type = nullOr str;
@ -148,7 +148,7 @@ in
description = "certmgr spec request object.";
};
};
}) path);
}));
description = ''
Certificate specs as described by:
<link xlink:href="https://github.com/cloudflare/certmgr#certificate-specs" />

View file

@ -129,19 +129,23 @@ in
# It's useful to have transmission in path, e.g. for remote control
environment.systemPackages = [ pkgs.transmission ];
users.users = optionalAttrs (cfg.user == "transmission") (singleton
{ name = "transmission";
users.users = optionalAttrs (cfg.user == "transmission") ({
transmission = {
name = "transmission";
group = cfg.group;
uid = config.ids.uids.transmission;
description = "Transmission BitTorrent user";
home = homeDir;
createHome = true;
});
};
});
users.groups = optionalAttrs (cfg.group == "transmission") (singleton
{ name = "transmission";
users.groups = optionalAttrs (cfg.group == "transmission") ({
transmission = {
name = "transmission";
gid = config.ids.gids.transmission;
});
};
});
# AppArmor profile
security.apparmor.profiles = mkIf apparmor [

View file

@ -295,6 +295,7 @@ in
wireguard-generated = handleTest ./wireguard/generated.nix {};
wireguard-namespaces = handleTest ./wireguard/namespaces.nix {};
wordpress = handleTest ./wordpress.nix {};
xandikos = handleTest ./xandikos.nix {};
xautolock = handleTest ./xautolock.nix {};
xfce = handleTest ./xfce.nix {};
xmonad = handleTest ./xmonad.nix {};

View file

@ -18,6 +18,17 @@ let
externalRouterAddress = "80.100.100.1";
externalClient2Address = "80.100.100.2";
externalTrackerAddress = "80.100.100.3";
transmissionConfig = { ... }: {
environment.systemPackages = [ pkgs.transmission ];
services.transmission = {
enable = true;
settings = {
dht-enabled = false;
message-level = 3;
};
};
};
in
{
@ -26,88 +37,79 @@ in
maintainers = [ domenkozar eelco rob bobvanderlinden ];
};
nodes =
{ tracker =
{ pkgs, ... }:
{ environment.systemPackages = [ pkgs.transmission ];
nodes = {
tracker = { pkgs, ... }: {
imports = [ transmissionConfig ];
virtualisation.vlans = [ 1 ];
networking.interfaces.eth1.ipv4.addresses = [
{ address = externalTrackerAddress; prefixLength = 24; }
];
virtualisation.vlans = [ 1 ];
networking.firewall.enable = false;
networking.interfaces.eth1.ipv4.addresses = [
{ address = externalTrackerAddress; prefixLength = 24; }
];
# We need Apache on the tracker to serve the torrents.
services.httpd.enable = true;
services.httpd.adminAddr = "foo@example.org";
services.httpd.documentRoot = "/tmp";
networking.firewall.enable = false;
services.opentracker.enable = true;
services.transmission.enable = true;
services.transmission.settings.dht-enabled = false;
services.transmission.settings.port-forwaring-enabled = false;
};
router =
{ pkgs, nodes, ... }:
{ virtualisation.vlans = [ 1 2 ];
networking.nat.enable = true;
networking.nat.internalInterfaces = [ "eth2" ];
networking.nat.externalInterface = "eth1";
networking.firewall.enable = true;
networking.firewall.trustedInterfaces = [ "eth2" ];
networking.interfaces.eth0.ipv4.addresses = [];
networking.interfaces.eth1.ipv4.addresses = [
{ address = externalRouterAddress; prefixLength = 24; }
];
networking.interfaces.eth2.ipv4.addresses = [
{ address = internalRouterAddress; prefixLength = 24; }
];
services.miniupnpd = {
enable = true;
externalInterface = "eth1";
internalIPs = [ "eth2" ];
appendConfig = ''
ext_ip=${externalRouterAddress}
'';
# We need Apache on the tracker to serve the torrents.
services.httpd = {
enable = true;
virtualHosts = {
"torrentserver.org" = {
adminAddr = "foo@example.org";
documentRoot = "/tmp";
};
};
client1 =
{ pkgs, nodes, ... }:
{ environment.systemPackages = [ pkgs.transmission pkgs.miniupnpc ];
virtualisation.vlans = [ 2 ];
networking.interfaces.eth0.ipv4.addresses = [];
networking.interfaces.eth1.ipv4.addresses = [
{ address = internalClient1Address; prefixLength = 24; }
];
networking.defaultGateway = internalRouterAddress;
networking.firewall.enable = false;
services.transmission.enable = true;
services.transmission.settings.dht-enabled = false;
services.transmission.settings.message-level = 3;
};
client2 =
{ pkgs, ... }:
{ environment.systemPackages = [ pkgs.transmission ];
virtualisation.vlans = [ 1 ];
networking.interfaces.eth0.ipv4.addresses = [];
networking.interfaces.eth1.ipv4.addresses = [
{ address = externalClient2Address; prefixLength = 24; }
];
networking.firewall.enable = false;
services.transmission.enable = true;
services.transmission.settings.dht-enabled = false;
services.transmission.settings.port-forwaring-enabled = false;
};
};
services.opentracker.enable = true;
};
testScript =
{ nodes, ... }:
''
router = { pkgs, nodes, ... }: {
virtualisation.vlans = [ 1 2 ];
networking.nat.enable = true;
networking.nat.internalInterfaces = [ "eth2" ];
networking.nat.externalInterface = "eth1";
networking.firewall.enable = true;
networking.firewall.trustedInterfaces = [ "eth2" ];
networking.interfaces.eth0.ipv4.addresses = [];
networking.interfaces.eth1.ipv4.addresses = [
{ address = externalRouterAddress; prefixLength = 24; }
];
networking.interfaces.eth2.ipv4.addresses = [
{ address = internalRouterAddress; prefixLength = 24; }
];
services.miniupnpd = {
enable = true;
externalInterface = "eth1";
internalIPs = [ "eth2" ];
appendConfig = ''
ext_ip=${externalRouterAddress}
'';
};
};
client1 = { pkgs, nodes, ... }: {
imports = [ transmissionConfig ];
environment.systemPackages = [ pkgs.miniupnpc ];
virtualisation.vlans = [ 2 ];
networking.interfaces.eth0.ipv4.addresses = [];
networking.interfaces.eth1.ipv4.addresses = [
{ address = internalClient1Address; prefixLength = 24; }
];
networking.defaultGateway = internalRouterAddress;
networking.firewall.enable = false;
};
client2 = { pkgs, ... }: {
imports = [ transmissionConfig ];
virtualisation.vlans = [ 1 ];
networking.interfaces.eth0.ipv4.addresses = [];
networking.interfaces.eth1.ipv4.addresses = [
{ address = externalClient2Address; prefixLength = 24; }
];
networking.firewall.enable = false;
};
};
testScript = { nodes, ... }: ''
start_all()
# Wait for network and miniupnpd.
@ -159,5 +161,4 @@ in
"cmp /tmp/test.tar.bz2 ${file}"
)
'';
})

70
nixos/tests/xandikos.nix Normal file
View file

@ -0,0 +1,70 @@
import ./make-test-python.nix (
{ pkgs, lib, ... }:
{
name = "xandikos";
meta.maintainers = [ lib.maintainers."0x4A6F" ];
nodes = {
xandikos_client = {};
xandikos_default = {
networking.firewall.allowedTCPPorts = [ 8080 ];
services.xandikos.enable = true;
};
xandikos_proxy = {
networking.firewall.allowedTCPPorts = [ 80 8080 ];
services.xandikos.enable = true;
services.xandikos.address = "localhost";
services.xandikos.port = 8080;
services.xandikos.routePrefix = "/xandikos/";
services.xandikos.extraOptions = [
"--defaults"
];
services.nginx = {
enable = true;
recommendedProxySettings = true;
virtualHosts."xandikos" = {
serverName = "xandikos.local";
basicAuth.xandikos = "snakeOilPassword";
locations."/xandikos/" = {
proxyPass = "http://localhost:8080/";
};
};
};
};
};
testScript = ''
start_all()
with subtest("Xandikos default"):
xandikos_default.wait_for_unit("multi-user.target")
xandikos_default.wait_for_unit("xandikos.service")
xandikos_default.wait_for_open_port(8080)
xandikos_default.succeed("curl --fail http://localhost:8080/")
xandikos_default.succeed(
"curl -s --fail --location http://localhost:8080/ | grep -qi Xandikos"
)
xandikos_client.wait_for_unit("network.target")
xandikos_client.fail("curl --fail http://xandikos_default:8080/")
with subtest("Xandikos proxy"):
xandikos_proxy.wait_for_unit("multi-user.target")
xandikos_proxy.wait_for_unit("xandikos.service")
xandikos_proxy.wait_for_open_port(8080)
xandikos_proxy.succeed("curl --fail http://localhost:8080/")
xandikos_proxy.succeed(
"curl -s --fail --location http://localhost:8080/ | grep -qi Xandikos"
)
xandikos_client.wait_for_unit("network.target")
xandikos_client.fail("curl --fail http://xandikos_proxy:8080/")
xandikos_client.succeed(
"curl -s --fail -u xandikos:snakeOilPassword -H 'Host: xandikos.local' http://xandikos_proxy/xandikos/ | grep -qi Xandikos"
)
xandikos_client.succeed(
"curl -s --fail -u xandikos:snakeOilPassword -H 'Host: xandikos.local' http://xandikos_proxy/xandikos/user/ | grep -qi Xandikos"
)
'';
}
)

View file

@ -1,5 +1,5 @@
{ fetchurl, stdenv, pkgconfig, intltool, libpulseaudio, gtkmm3
, libcanberra-gtk3, makeWrapper, gnome3 }:
, libcanberra-gtk3, gnome3, wrapGAppsHook }:
stdenv.mkDerivation rec {
pname = "pavucontrol";
@ -10,16 +10,10 @@ stdenv.mkDerivation rec {
sha256 = "1qhlkl3g8d7h72xjskii3g1l7la2cavwp69909pzmbi2jyn5pi4g";
};
preFixup = ''
wrapProgram "$out/bin/pavucontrol" \
--set GDK_PIXBUF_MODULE_FILE "$GDK_PIXBUF_MODULE_FILE" \
--prefix XDG_DATA_DIRS : "$XDG_ICON_DIRS"
'';
buildInputs = [ libpulseaudio gtkmm3 libcanberra-gtk3 makeWrapper
buildInputs = [ libpulseaudio gtkmm3 libcanberra-gtk3
gnome3.adwaita-icon-theme ];
nativeBuildInputs = [ pkgconfig intltool ];
nativeBuildInputs = [ pkgconfig intltool wrapGAppsHook ];
configureFlags = [ "--disable-lynx" ];

View file

@ -6,16 +6,16 @@
rustPlatform.buildRustPackage rec {
pname = "spotifyd";
version = "0.2.20";
version = "0.2.23";
src = fetchFromGitHub {
owner = "Spotifyd";
repo = "spotifyd";
rev = "v${version}";
sha256 = "1hf4wpk7r0s4jpjhxaz67y1hd8jx9ns5imd85r3cdg4lxf3j5gph";
sha256 = "0xxr21avgr4pvlr5vgb68jmad5xy5kqvaxfzh0qn1jpiax7y3avm";
};
cargoSha256 = "1h3fis47hmxvppiv1icjhgp48nd46gayfcmzfjs34q6jask90n0w";
cargoSha256 = "1ykmn7zzwn9my96bbxwkparab5lck1zzdkpafil2mmrjyvyi40da";
cargoBuildFlags = [
"--no-default-features"

View file

@ -3236,10 +3236,10 @@
elpaBuild {
pname = "undo-tree";
ename = "undo-tree";
version = "0.7";
version = "0.7.2";
src = fetchurl {
url = "https://elpa.gnu.org/packages/undo-tree-0.7.el";
sha256 = "0mc5spiqx20z8vh8b24dp9hqj27h5bm5wqk0ga7c6s6mp69r72h4";
url = "https://elpa.gnu.org/packages/undo-tree-0.7.2.el";
sha256 = "0gdqh5rkgwlancbjx5whgl5gqkdipdkspkl2bqmrq70sgg5ahrcc";
};
packageRequires = [];
meta = {
@ -3734,4 +3734,4 @@
license = lib.licenses.free;
};
}) {};
}
}

View file

@ -111,6 +111,11 @@ env NIXPKGS_ALLOW_BROKEN=1 nix-instantiate --show-trace ../../../../ -A emacsPac
flycheck-rtags = fix-rtags super.flycheck-rtags;
gnuplot = super.gnuplot.overrideAttrs (old: {
nativeBuildInputs =
(old.nativeBuildInputs or []) ++ [ pkgs.autoreconfHook ];
});
pdf-tools = super.pdf-tools.overrideAttrs(old: {
nativeBuildInputs = [ external.pkgconfig ];
buildInputs = with external; old.buildInputs ++ [ autoconf automake libpng zlib poppler ];

View file

@ -4,13 +4,13 @@
let
unwrapped = mkDerivation rec {
pname = "neovim-qt-unwrapped";
version = "0.2.12";
version = "0.2.15";
src = fetchFromGitHub {
owner = "equalsraf";
repo = "neovim-qt";
rev = "v${version}";
sha256 = "09s3044j0y8nmyi8ykslfii6fx7k9mckmdvb0jn2xmdabpb60i20";
sha256 = "097nykglqp4jyvla4yp32sc1f1hph4cqqhp6rm9ww7br8c0j54xl";
};
cmakeFlags = [

View file

@ -39,6 +39,5 @@ stdenv.mkDerivation rec {
license = licenses.bsd3;
maintainers = [ maintainers.goibhniu ];
platforms = platforms.unix;
badPlatforms = [ "x86_64-darwin" ];
};
}

View file

@ -1,32 +1,72 @@
{ stdenv, fetchurl, lib, makeWrapper,
{ stdenv, fetchurl, lib, makeWrapper, wrapGAppsHook,
# build dependencies
alsaLib, atk, cairo, cups, dbus, expat, fontconfig,
freetype, gdk-pixbuf, glib, gnome2, nspr, nss, xorg,
glibc, systemd
alsaLib, atk, at-spi2-atk, at-spi2-core, cairo, cups, dbus, expat, fontconfig,
freetype, gdk-pixbuf, glib, glibc, gtk3, libuuid, nspr, nss, pango,
xorg, systemd
}:
let
stdenv.mkDerivation rec {
version = "3.0.4";
deps = [
alsaLib
atk
at-spi2-atk
at-spi2-core
cairo
cups
dbus
expat
fontconfig
freetype
gdk-pixbuf
glib
glibc
gtk3
libuuid
nspr
nss
pango
xorg.libX11
xorg.libxcb
xorg.libXScrnSaver
xorg.libXcomposite
xorg.libXcursor
xorg.libXdamage
xorg.libXext
xorg.libXfixes
xorg.libXi
xorg.libXrandr
xorg.libXrender
xorg.libXtst
stdenv.cc.cc.lib
stdenv.cc.cc
];
in stdenv.mkDerivation rec {
version = "3.1.0";
pname = "pencil";
src = fetchurl {
url = "http://pencil.evolus.vn/dl/V${version}/Pencil_${version}_amd64.deb";
sha256 = "58e2b794c615ea8715d8374f177e19c87f7071e359826ec34a59836d537a62fd";
url = "http://pencil.evolus.vn/dl/V${version}.ga/pencil_${version}.ga_amd64.deb";
sha256 = "01ae54b1a1351b909eb2366c6ec00816e1deba370e58f35601cf7368f10aaba3";
};
sourceRoot = ".";
unpackCmd = ''
ar p "$src" data.tar.xz | tar xJ
ar p "$src" data.tar.gz | tar xz
'';
dontBuild = true;
nativeBuildInputs = [ makeWrapper ];
nativeBuildInputs = [ makeWrapper wrapGAppsHook ];
buildInputs = deps;
installPhase = ''
mkdir -p $out/bin
cp -R usr/share opt $out/
mkdir -p $out/bin $out/opt $out/share/applications
cp -R usr/share $out/
cp -R opt/pencil*/ $out/opt/pencil
cp $out/opt/pencil/pencil.desktop $out/share/applications/
# fix the path in the desktop file
substituteInPlace \
@ -34,42 +74,12 @@ stdenv.mkDerivation rec {
--replace /opt/ $out/opt/
# symlink the binary to bin/
ln -s $out/opt/Pencil/pencil $out/bin/pencil
ln -s $out/opt/pencil/pencil $out/bin/pencil
'';
preFixup = let
packages = [
alsaLib
atk
cairo
cups
dbus
expat
fontconfig
freetype
gdk-pixbuf
glib
gnome2.GConf
gnome2.gtk
gnome2.pango
nspr
nss
xorg.libX11
xorg.libXScrnSaver
xorg.libXcomposite
xorg.libXcursor
xorg.libXdamage
xorg.libXext
xorg.libXfixes
xorg.libXi
xorg.libXrandr
xorg.libXrender
xorg.libXtst
stdenv.cc.cc.lib
stdenv.cc.cc
glibc
];
packages = deps;
libPathNative = lib.makeLibraryPath packages;
libPath64 = lib.makeSearchPathOutput "lib" "lib64" packages;
libPath = "${libPathNative}:${libPath64}";
@ -77,21 +87,13 @@ stdenv.mkDerivation rec {
# patch executable
patchelf \
--set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
--set-rpath "${libPath}:$out/opt/Pencil" \
$out/opt/Pencil/pencil
# patch libnode
patchelf \
--set-rpath "${libPath}" \
$out/opt/Pencil/libnode.so
# libffmpeg is for some reason not executable
chmod a+x $out/opt/Pencil/libffmpeg.so
--set-rpath "${libPath}:$out/opt/pencil" \
$out/opt/pencil/pencil
# fix missing libudev
ln -s ${systemd.lib}/lib/libudev.so.1 $out/opt/Pencil/libudev.so.1
wrapProgram $out/opt/Pencil/pencil \
--prefix LD_LIBRARY_PATH : $out/opt/Pencil
ln -s ${systemd.lib}/lib/libudev.so.1 $out/opt/pencil/libudev.so.1
wrapProgram $out/opt/pencil/pencil \
--prefix LD_LIBRARY_PATH : $out/opt/pencil
'';
meta = with stdenv.lib; {

View file

@ -7,13 +7,13 @@ with stdenv.lib;
rustPlatform.buildRustPackage rec {
pname = "rx";
version = "0.3.1";
version = "0.3.2";
src = fetchFromGitHub {
owner = "cloudhead";
repo = pname;
rev = "v${version}";
sha256 = "1byaxbhd3q49473kcdd52rvn3xq7bmy8bdx3pz0jiw96bclzhcgq";
sha256 = "1n5s7v2z13550gkqz7w6dw62jdy60wdi8w1lfa23609b4yhg4w94";
};
cargoSha256 = "173jfjvdag97f6jvfg366hjk9v3cz301cbzpcahy51rbf1cip1w1";

View file

@ -0,0 +1,105 @@
diff a/build_files/cmake/platform/platform_apple.cmake b/build_files/cmake/platform/platform_apple.cmake
--- a/build_files/cmake/platform/platform_apple.cmake
+++ b/build_files/cmake/platform/platform_apple.cmake
@@ -35,7 +35,6 @@ else()
message(STATUS "Using pre-compiled LIBDIR: ${LIBDIR}")
endif()
if(NOT EXISTS "${LIBDIR}/")
- message(FATAL_ERROR "Mac OSX requires pre-compiled libs at: '${LIBDIR}'")
endif()
if(WITH_OPENAL)
@@ -79,7 +78,7 @@ endif()
if(WITH_CODEC_SNDFILE)
set(LIBSNDFILE ${LIBDIR}/sndfile)
set(LIBSNDFILE_INCLUDE_DIRS ${LIBSNDFILE}/include)
- set(LIBSNDFILE_LIBRARIES sndfile FLAC ogg vorbis vorbisenc)
+ set(LIBSNDFILE_LIBRARIES sndfile)
set(LIBSNDFILE_LIBPATH ${LIBSNDFILE}/lib ${LIBDIR}/ffmpeg/lib) # TODO, deprecate
endif()
@@ -90,7 +89,7 @@ if(WITH_PYTHON)
# normally cached but not since we include them with blender
set(PYTHON_INCLUDE_DIR "${LIBDIR}/python/include/python${PYTHON_VERSION}m")
set(PYTHON_EXECUTABLE "${LIBDIR}/python/bin/python${PYTHON_VERSION}m")
- set(PYTHON_LIBRARY ${LIBDIR}/python/lib/libpython${PYTHON_VERSION}m.a)
+ set(PYTHON_LIBRARY "${LIBDIR}/python/lib/libpython${PYTHON_VERSION}m.dylib")
set(PYTHON_LIBPATH "${LIBDIR}/python/lib/python${PYTHON_VERSION}")
# set(PYTHON_LINKFLAGS "-u _PyMac_Error") # won't build with this enabled
else()
@@ -155,10 +154,7 @@ if(WITH_CODEC_FFMPEG)
set(FFMPEG_INCLUDE_DIRS ${FFMPEG}/include)
set(FFMPEG_LIBRARIES
avcodec avdevice avformat avutil
- mp3lame swscale x264 xvidcore
- theora theoradec theoraenc
- vorbis vorbisenc vorbisfile ogg opus
- vpx swresample)
+ swscale swresample)
set(FFMPEG_LIBPATH ${FFMPEG}/lib)
endif()
@@ -199,14 +195,14 @@ if(WITH_OPENCOLLADA)
set(OPENCOLLADA ${LIBDIR}/opencollada)
set(OPENCOLLADA_INCLUDE_DIRS
- ${LIBDIR}/opencollada/include/COLLADAStreamWriter
- ${LIBDIR}/opencollada/include/COLLADABaseUtils
- ${LIBDIR}/opencollada/include/COLLADAFramework
- ${LIBDIR}/opencollada/include/COLLADASaxFrameworkLoader
- ${LIBDIR}/opencollada/include/GeneratedSaxParser
+ ${LIBDIR}/opencollada/include/opencollada/COLLADAStreamWriter
+ ${LIBDIR}/opencollada/include/opencollada/COLLADABaseUtils
+ ${LIBDIR}/opencollada/include/opencollada/COLLADAFramework
+ ${LIBDIR}/opencollada/include/opencollada/COLLADASaxFrameworkLoader
+ ${LIBDIR}/opencollada/include/opencollada/GeneratedSaxParser
)
- set(OPENCOLLADA_LIBPATH ${OPENCOLLADA}/lib)
+ set(OPENCOLLADA_LIBPATH ${OPENCOLLADA}/lib/opencollada)
set(OPENCOLLADA_LIBRARIES
OpenCOLLADASaxFrameworkLoader
-lOpenCOLLADAFramework
@@ -215,7 +211,7 @@ if(WITH_OPENCOLLADA)
-lMathMLSolver
-lGeneratedSaxParser
-lbuffer -lftoa -lUTF
- ${OPENCOLLADA_LIBPATH}/libxml2.a
+ xml2
)
# PCRE is bundled with openCollada
# set(PCRE ${LIBDIR}/pcre)
@@ -276,14 +272,13 @@ if(WITH_BOOST)
endif()
if(WITH_INTERNATIONAL OR WITH_CODEC_FFMPEG)
- set(PLATFORM_LINKFLAGS "${PLATFORM_LINKFLAGS} -liconv") # boost_locale and ffmpeg needs it !
endif()
if(WITH_OPENIMAGEIO)
set(OPENIMAGEIO ${LIBDIR}/openimageio)
set(OPENIMAGEIO_INCLUDE_DIRS ${OPENIMAGEIO}/include)
set(OPENIMAGEIO_LIBRARIES
- ${OPENIMAGEIO}/lib/libOpenImageIO.a
+ ${OPENIMAGEIO}/lib/libOpenImageIO.dylib
${PNG_LIBRARIES}
${JPEG_LIBRARIES}
${TIFF_LIBRARY}
@@ -306,7 +301,7 @@ endif()
if(WITH_OPENCOLORIO)
set(OPENCOLORIO ${LIBDIR}/opencolorio)
set(OPENCOLORIO_INCLUDE_DIRS ${OPENCOLORIO}/include)
- set(OPENCOLORIO_LIBRARIES OpenColorIO tinyxml yaml-cpp)
+ set(OPENCOLORIO_LIBRARIES OpenColorIO)
set(OPENCOLORIO_LIBPATH ${OPENCOLORIO}/lib)
endif()
@@ -443,7 +438,7 @@ else()
set(CMAKE_CXX_FLAGS_RELEASE "-mdynamic-no-pic -fno-strict-aliasing")
endif()
-if(${XCODE_VERSION} VERSION_EQUAL 5 OR ${XCODE_VERSION} VERSION_GREATER 5)
+if(FALSE)
# Xcode 5 is always using CLANG, which has too low template depth of 128 for libmv
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -ftemplate-depth=1024")
endif()

View file

@ -1,13 +1,14 @@
{ config, stdenv, lib, fetchurl, boost, cmake, ffmpeg, gettext, glew
, ilmbase, libXi, libX11, libXext, libXrender
, libjpeg, libpng, libsamplerate, libsndfile
, libtiff, libGLU, libGL, openal, opencolorio, openexr, openimageio, openjpeg_1, python3Packages
, libtiff, libGLU, libGL, openal, opencolorio, openexr, openimageio2, openjpeg, python3Packages
, openvdb, libXxf86vm, tbb
, zlib, fftw, opensubdiv, freetype, jemalloc, ocl-icd, addOpenGLRunpath
, jackaudioSupport ? false, libjack2
, cudaSupport ? config.cudaSupport or false, cudatoolkit
, colladaSupport ? true, opencollada
, enableNumpy ? false, makeWrapper
, pugixml, SDL, Cocoa, CoreGraphics, ForceFeedback, OpenAL, OpenGL
}:
with lib;
@ -23,22 +24,53 @@ stdenv.mkDerivation rec {
sha256 = "1zl0ar95qkxsrbqw9miz2hrjijlqjl06vg3clfk9rm7krr2l3b2j";
};
patches = lib.optional stdenv.isDarwin ./darwin.patch;
nativeBuildInputs = [ cmake ] ++ optional cudaSupport addOpenGLRunpath;
buildInputs =
[ boost ffmpeg gettext glew ilmbase
libXi libX11 libXext libXrender
freetype libjpeg libpng libsamplerate libsndfile libtiff libGLU libGL openal
opencolorio openexr openimageio openjpeg_1 python zlib fftw jemalloc
freetype libjpeg libpng libsamplerate libsndfile libtiff
opencolorio openexr openimageio2 openjpeg python zlib fftw jemalloc
(opensubdiv.override { inherit cudaSupport; })
openvdb libXxf86vm tbb
tbb
makeWrapper
]
++ (if (!stdenv.isDarwin) then [
libXi libX11 libXext libXrender
libGLU libGL openal
libXxf86vm
# OpenVDB currently doesn't build on darwin
openvdb
]
else [
pugixml SDL Cocoa CoreGraphics ForceFeedback OpenAL OpenGL
])
++ optional jackaudioSupport libjack2
++ optional cudaSupport cudatoolkit
++ optional colladaSupport opencollada;
postPatch =
''
if stdenv.isDarwin then ''
: > build_files/cmake/platform/platform_apple_xcode.cmake
substituteInPlace source/creator/CMakeLists.txt \
--replace '${"$"}{LIBDIR}/python' \
'${python}'
substituteInPlace build_files/cmake/platform/platform_apple.cmake \
--replace '${"$"}{LIBDIR}/python' \
'${python}' \
--replace '${"$"}{LIBDIR}/opencollada' \
'${opencollada}' \
--replace '${"$"}{PYTHON_LIBPATH}/site-packages/numpy' \
'${python3Packages.numpy}/${python.sitePackages}/numpy' \
--replace 'set(OPENJPEG_INCLUDE_DIRS ' \
'set(OPENJPEG_INCLUDE_DIRS "'$(echo ${openjpeg.dev}/include/openjpeg-*)'") #' \
--replace 'set(OPENJPEG_LIBRARIES ' \
'set(OPENJPEG_LIBRARIES "${openjpeg}/lib/libopenjp2.dylib") #' \
--replace 'set(OPENIMAGEIO ' \
'set(OPENIMAGEIO "${openimageio2.out}") #' \
--replace 'set(OPENEXR_INCLUDE_DIRS ' \
'set(OPENEXR_INCLUDE_DIRS "${openexr.dev}/include/OpenEXR") #'
'' else ''
substituteInPlace extern/clew/src/clew.c --replace '"libOpenCL.so"' '"${ocl-icd}/lib/libOpenCL.so"'
'';
@ -48,7 +80,7 @@ stdenv.mkDerivation rec {
"-DWITH_CODEC_SNDFILE=ON"
"-DWITH_INSTALL_PORTABLE=OFF"
"-DWITH_FFTW3=ON"
#"-DWITH_SDL=ON"
"-DWITH_SDL=OFF"
"-DWITH_OPENCOLORIO=ON"
"-DWITH_OPENSUBDIV=ON"
"-DPYTHON_LIBRARY=${python.libPrefix}m"
@ -61,10 +93,18 @@ stdenv.mkDerivation rec {
"-DWITH_OPENVDB=ON"
"-DWITH_TBB=ON"
"-DWITH_IMAGE_OPENJPEG=ON"
"-DWITH_OPENCOLLADA=${if colladaSupport then "ON" else "OFF"}"
]
++ optionals stdenv.isDarwin [
"-DWITH_CYCLES_OSL=OFF" # requires LLVM
"-DWITH_OPENVDB=OFF" # OpenVDB currently doesn't build on darwin
"-DLIBDIR=/does-not-exist"
]
# Clang doesn't support "-export-dynamic"
++ optional stdenv.cc.isClang "-DPYTHON_LINKFLAGS="
++ optional jackaudioSupport "-DWITH_JACK=ON"
++ optional cudaSupport "-DWITH_CYCLES_CUDA_BINARIES=ON"
++ optional colladaSupport "-DWITH_OPENCOLLADA=ON";
++ optional cudaSupport "-DWITH_CYCLES_CUDA_BINARIES=ON";
NIX_CFLAGS_COMPILE = "-I${ilmbase.dev}/include/OpenEXR -I${python}/include/${python.libPrefix}";
@ -95,7 +135,7 @@ stdenv.mkDerivation rec {
# They comment two licenses: GPLv2 and Blender License, but they
# say: "We've decided to cancel the BL offering for an indefinite period."
license = licenses.gpl2Plus;
platforms = [ "x86_64-linux" ];
platforms = [ "x86_64-linux" "x86_64-darwin" ];
maintainers = [ maintainers.goibhniu ];
};
}

View file

@ -1,17 +1,17 @@
{ stdenv, fetchFromGitHub, meson, ninja, gettext, python3, fetchpatch,
{ stdenv, fetchFromGitHub, meson, ninja, gettext, python3,
pkgconfig, libxml2, json-glib , sqlite, itstool, librsvg, yelp-tools,
vala, gtk3, gnome3, desktop-file-utils, wrapGAppsHook, gobject-introspection
}:
stdenv.mkDerivation rec {
pname = "font-manager";
version = "0.7.5";
version = "0.7.7";
src = fetchFromGitHub {
owner = "FontManager";
repo = "master";
rev = version;
sha256 = "16hma8rrkam6ngn5vbdaryn31vdixvii6920g9z928gylz9xkd3g";
sha256 = "1bzqvspplp1zj0n0869jqbc60wgbjhf0vdrn5bj8dfawxynh8s5f";
};
nativeBuildInputs = [
@ -38,19 +38,6 @@ stdenv.mkDerivation rec {
gnome3.adwaita-icon-theme
];
mesonFlags = [
"-Ddisable_pycompile=true"
];
patches = [
# fix build with Vala 0.46
(fetchpatch {
url = "https://github.com/FontManager/font-manager/commit/c73b40de11f376f4515a0edfe97fb3721a264b35.patch";
sha256 = "0lacwsifgvda2r3z6j2a0svdqr6mgav7zkvih35xa8155y8wfpnw";
excludes = [ "fedora/font-manager.spec" ];
})
];
postPatch = ''
chmod +x meson_post_install.py
patchShebangs meson_post_install.py

View file

@ -4,13 +4,13 @@
stdenv.mkDerivation rec {
pname = "mako";
version = "1.4";
version = "1.4.1";
src = fetchFromGitHub {
owner = "emersion";
repo = pname;
rev = "v${version}";
sha256 = "11ymiq6cr2ma0iva1mqybn3j6k73bsc6lv6pcbdq7hkhd4f9b7j9";
sha256 = "0hwvibpnrximb628w9dsfjpi30b5jy7nfkm4d94z5vhp78p43vxh";
};
nativeBuildInputs = [ meson ninja pkgconfig scdoc wayland-protocols ];
@ -22,7 +22,7 @@ stdenv.mkDerivation rec {
description = "A lightweight Wayland notification daemon";
homepage = https://wayland.emersion.fr/mako/;
license = licenses.mit;
maintainers = with maintainers; [ dywedir ];
maintainers = with maintainers; [ dywedir synthetica ];
platforms = platforms.linux;
};
}

View file

@ -1,46 +1,27 @@
{ stdenv, fetchurl, zlib } :
{ stdenv, fetchFromGitLab, autoreconfHook, zlib }:
let
convert_src = fetchurl {
url = http://m.m.i24.cc/osmconvert.c;
sha256 = "1mvmb171c1jqxrm80jc7qicwk4kgg7yq694n7ci65g6i284r984x";
# version = 0.8.5
};
filter_src = fetchurl {
url = http://m.m.i24.cc/osmfilter.c;
sha256 = "0vm3bls9jb2cb5b11dn82sxnc22qzkf4ghmnkivycigrwa74i6xl";
# version = 1.4.0
};
in
stdenv.mkDerivation {
stdenv.mkDerivation rec {
pname = "osmctools";
version = "0.8.5plus1.4.0";
version = "0.9";
src = fetchFromGitLab {
owner = "osm-c-tools";
repo = pname;
rev = version;
sha256 = "1m8d3r1q1v05pkr8k9czrmb4xjszw6hvgsf3kn9pf0v14gpn4r8f";
};
nativeBuildInputs = [ autoreconfHook ];
buildInputs = [ zlib ];
phases = [ "buildPhase" "installPhase" ];
buildPhase = ''
cc ${convert_src} -lz -O3 -o osmconvert
cc ${filter_src} -O3 -o osmfilter
'';
installPhase = ''
mkdir -p $out/bin
mv osmconvert $out/bin
mv osmfilter $out/bin
'';
meta = with stdenv.lib; {
description = "Command line tools for transforming Open Street Map files";
homepage = [
https://wiki.openstreetmap.org/wiki/Osmconvert
https://wiki.openstreetmap.org/wiki/Osmfilter
https://wiki.openstreetmap.org/wiki/osmconvert
https://wiki.openstreetmap.org/wiki/osmfilter
https://wiki.openstreetmap.org/wiki/osmupdate
];
maintainers = with maintainers; [ sikmir ];
platforms = platforms.unix;
license = licenses.agpl3;
};

View file

@ -1,4 +1,4 @@
{ stdenv, fetchFromGitHub, meson, pkgconfig, ninja
{ stdenv, fetchFromGitHub, meson, pkgconfig, ninja, wrapGAppsHook
, wayland, wlroots, gtkmm3, libinput, libsigcxx, jsoncpp, fmt, scdoc, spdlog, gtk-layer-shell
, traySupport ? true, libdbusmenu-gtk3
, pulseSupport ? false, libpulseaudio
@ -19,7 +19,7 @@
};
nativeBuildInputs = [
meson ninja pkgconfig scdoc
meson ninja pkgconfig scdoc wrapGAppsHook
];
buildInputs = with stdenv.lib;

View file

@ -2,7 +2,7 @@
let
pname = "Sylk";
version = "2.1.0";
version = "2.5.0";
in
appimageTools.wrapType2 rec {
@ -10,7 +10,7 @@ appimageTools.wrapType2 rec {
src = fetchurl {
url = "http://download.ag-projects.com/Sylk/Sylk-${version}-x86_64.AppImage";
sha256 = "1ifi8qr6f84dcssxhv5ar1s48nsqxiv2j1blc82248hmq5is24mf";
sha256 = "1jhs25zzdac3r2wz886vlpb0bz77p52mdlrbsbv28h6is79pbd69";
};
profile = ''

View file

@ -45,11 +45,11 @@ let
flash = stdenv.mkDerivation rec {
pname = "flashplayer-ppapi";
version = "32.0.0.303";
version = "32.0.0.314";
src = fetchzip {
url = "https://fpdownload.adobe.com/pub/flashplayer/pdc/${version}/flash_player_ppapi_linux.x86_64.tar.gz";
sha256 = "0b2cw8y9rif2p0lyy2ir1v5lchxlsh543b9c743a2p85c9p7q62b";
sha256 = "05xcscpzglpfpiiqc3ngs5snxli99irjk18g5vdhw91jk9808gnl";
stripRoot = false;
};

View file

@ -74,7 +74,7 @@ let
in
stdenv.mkDerivation rec {
pname = "flashplayer";
version = "32.0.0.303";
version = "32.0.0.314";
src = fetchurl {
url =
@ -85,14 +85,14 @@ stdenv.mkDerivation rec {
sha256 =
if debug then
if arch == "x86_64" then
"05hfc5ywmcvp6zf8aqmzjp3qy3byp0zdl0ssrv9gvzcskdqkhsj2"
"076l93wjcy15sic88cyq6msp87gdhcvbk4ym2vbvvjz2bav2z456"
else
"12hl8lvxz648ha70gi3v85mwf0nnayjiaslr669vjan3ww94jymv"
"0kxr8d6fh00akqgk3lwv0z6rk7xswislicsbh9b9p33f19mj7c8a"
else
if arch == "x86_64" then
"0x0mabgswly2v8z13832pkbjsv404aq61pback6sgmp2lyycdg6w"
"0a3hvp0qmqlann8k875ajf0i70cv0an1a3mr8kbgji46dxqvwjxz"
else
"16kbpf1i3aqlrfbfh5ncg1n46ncl9hp6qdp36s5j3ivbc68pj81z";
"0jyywas2z7ssgzng82qgnp01gy6nccqavkbx9529m07xrclvqbxn";
};
nativeBuildInputs = [ unzip ];

View file

@ -50,7 +50,7 @@
stdenv.mkDerivation {
pname = "flashplayer-standalone";
version = "32.0.0.303";
version = "32.0.0.314";
src = fetchurl {
url =
@ -60,9 +60,9 @@ stdenv.mkDerivation {
"https://fpdownload.macromedia.com/pub/flashplayer/updaters/32/flash_player_sa_linux.x86_64.tar.gz";
sha256 =
if debug then
"0xkzlv90lpyy54j6pllknrp1l9vjyh6dsl63l4c8cgh4i830gi14"
"0zlin94rip13rn58m7v5l6m20ylnw59l77rbg5j5qyxkr53zawdz"
else
"0mi3ggv6zhzmdd1h68cgl87n6izhp0pbkhnidd2gl2cp95f23c2d";
"0pfrm02iwa01pqx3adqj0sw27p1ddlz9knjky6x248ak8zywsqr2";
};
nativeBuildInputs = [ unzip ];

View file

@ -20,14 +20,14 @@
}:
stdenv.mkDerivation rec {
version = "1.0.3.1";
version = "1.0.4";
pname = "cawbird";
src = fetchFromGitHub {
owner = "IBBoard";
repo = "cawbird";
rev = "v${version}";
sha256 = "sha256:1v1y4bx0mm518b9vlpsry12fw1qz2j28jfhjqq73blvzd89lgb0y";
sha256 = "sha256:1gqi7bn08b9cjpb0mgs6bk1a2npdfhn56ckps95nck0jyqzfbnir";
};
nativeBuildInputs = [

View file

@ -1,13 +1,13 @@
{ stdenv, lib, fetchFromGitHub, go, removeReferencesTo, buildGoPackage }:
buildGoPackage rec {
pname = "cni-plugins";
version = "0.8.3";
version = "0.8.4";
src = fetchFromGitHub {
owner = "containernetworking";
repo = "plugins";
rev = "v${version}";
sha256 = "0dc4fs08x4x518yhgvq3drjvansnc0cb8rm4h5wiw7k3whjii3cd";
sha256 = "02kz6y3klhbriybsskn4hmldwli28cycnp2klsm2x0y9c73iczdp";
};
goDeps = ./plugins-deps.nix;

View file

@ -1,21 +0,0 @@
# This file was generated by https://github.com/kamilchm/go2nix v1.2.1
[
{
goPackagePath = "github.com/docker/machine";
fetch = {
type = "git";
url = "https://github.com/docker/machine";
rev = "5b274558ea6ca822c06dd407a4e774a0105c3f60";
sha256 = "1wdq9h4bx7awgclh969gvmcnl9jvgv7ldfklnclh5iv47mi7q22d";
};
}
{
goPackagePath = "github.com/zchee/libhyperkit";
fetch = {
type = "git";
url = "https://github.com/zchee/libhyperkit";
rev = "1a19a7693fac32b46ec6cdd22da6fbec974447fc";
sha256 = "119f5gcl24znwnmi837jk667asd3lirx32jldpd4mbyb3sm9nz24";
};
}
]

View file

@ -1,24 +1,36 @@
{ stdenv, buildGoPackage, fetchFromGitHub, pkgconfig, Hypervisor, vmnet }:
{ stdenv, buildGoPackage, fetchFromGitHub, fetchpatch, pkgconfig, cctools, Hypervisor, vmnet }:
buildGoPackage rec {
pname = "docker-machine-xhyve";
version = "0.3.3";
version = "0.4.0";
goPackagePath = "github.com/zchee/docker-machine-driver-xhyve";
goDeps = ./xhyve-deps.nix;
# https://github.com/machine-drivers/docker-machine-driver-xhyve/pull/225
patches = fetchpatch {
url = "https://github.com/machine-drivers/docker-machine-driver-xhyve/commit/546256494bf2ccc33e4125bf45f504b0e3027d5a.patch";
sha256 = "1i8wxqccqkxvqrbsyd0g9s0kdskd8xi2jv0c1bji9aj4rq0a8cgz";
};
preBuild = ''
make -C go/src/${goPackagePath} CC=${stdenv.cc}/bin/cc LIBTOOL=${cctools}/bin/libtool GIT_CMD=: lib9p
export CGO_CFLAGS=-I$(pwd)/go/src/${goPackagePath}/vendor/github.com/jceel/lib9p
export CGO_LDFLAGS=$(pwd)/go/src/${goPackagePath}/vendor/build/lib9p/lib9p.a
'';
buildFlags = "--tags lib9p";
src = fetchFromGitHub {
rev = "v${version}";
owner = "zchee";
owner = "machine-drivers";
repo = "docker-machine-driver-xhyve";
sha256 = "0rj6pyqp4yv4j28bglqjs95rip5i77vv8mrkmqv1rxrsl3i8aqqy";
sha256 = "0000v97fr8xc5b39v44hsa87wrbk4bcwyaaivxv4hxlf4vlgg863";
};
nativeBuildInputs = [ pkgconfig ];
buildInputs = [ Hypervisor vmnet ];
meta = with stdenv.lib; {
homepage = https://github.com/zchee/docker-machine-driver-xhyve;
homepage = https://github.com/machine-drivers/docker-machine-driver-xhyve;
description = "Xhyve driver for docker-machine.";
license = licenses.bsd3;
maintainers = with maintainers; [ periklis ];

View file

@ -27,11 +27,11 @@ with stdenv.lib;
stdenv.mkDerivation rec {
pname = "mutt";
version = "1.13.2";
version = "1.13.3";
src = fetchurl {
url = "http://ftp.mutt.org/pub/mutt/${pname}-${version}.tar.gz";
sha256 = "0x4yfvk8415p80h9an242n6q3b43mw6mnnczh95zd3j0zwdr6wrg";
sha256 = "0y3ks10mc7m8c7pd4c4j8pj7n5rqcvzrjs8mzldv7z7jnlb30hkq";
};
patches = optional smimeSupport (fetchpatch {

View file

@ -8,7 +8,7 @@
let
version = "0.7.1";
version = "0.7.2";
modulesVersion = with lib; versions.major version + "." + versions.minor version;
modulesPath = "lib/SoapySDR/modules" + modulesVersion;
extraPackagesSearchPath = lib.makeSearchPath modulesPath extraPackages;
@ -21,7 +21,7 @@ in stdenv.mkDerivation {
owner = "pothosware";
repo = "SoapySDR";
rev = "soapy-sdr-${version}";
sha256 = "1rbnd3w12kzsh94fiywyn4vch7h0kf75m88fi6nq992b3vnmiwvl";
sha256 = "102wnpjxrwba20pzdh1vvx0yg1h8vqd8z914idxflg9p14r6v5am";
};
nativeBuildInputs = [ cmake makeWrapper pkgconfig ];

View file

@ -0,0 +1,40 @@
{ mkDerivation, haskellPackages, fetchurl, lib }:
mkDerivation rec {
pname = "nota";
version = "1.0";
# Can't use fetchFromGitLab since codes.kary.us doesn't support https
src = fetchurl {
url = "http://codes.kary.us/nota/nota/-/archive/V${version}/nota-V${version}.tar.bz2";
sha256 = "0bbs6bm9p852hvqadmqs428ir7m65h2prwyma238iirv42pk04v8";
};
postUnpack = ''
export sourceRoot=$sourceRoot/source
'';
isLibrary = false;
isExecutable = true;
libraryHaskellDepends = with haskellPackages; [
base
bytestring
array
split
scientific
parsec
ansi-terminal
regex-compat
containers
terminal-size
numbers
text
time
];
description = "The most beautiful command line calculator";
homepage = "https://kary.us/nota";
license = lib.licenses.mpl20;
maintainers = with lib.maintainers; [ dtzWill ];
}

View file

@ -13,7 +13,7 @@ stdenv.mkDerivation {
buildInputs = [ (callPackage ./romkatv_libgit2.nix {}) ];
patchPhase = ''
sed -i "s|local daemon=.*|local daemon=$out/bin/gitstatusd|" gitstatus.plugin.zsh
sed -i "1i GITSTATUS_DAEMON=$out/bin/gitstatusd" gitstatus.plugin.zsh
'';
installPhase = ''
install -Dm755 gitstatusd $out/bin/gitstatusd

View file

@ -1,11 +1,11 @@
{
"version": "12.6.2",
"repo_hash": "0bchamvr3f0ph49f7xa76gsp2mjj1ajy4q0wy1hjvr9bayxx94av",
"version": "12.6.4",
"repo_hash": "0jsww785bxvjdrp1wsz6zkvx9zr69j24bway6nfyjkz8a7vbl9ls",
"owner": "gitlab-org",
"repo": "gitlab",
"rev": "v12.6.2-ee",
"rev": "v12.6.4-ee",
"passthru": {
"GITALY_SERVER_VERSION": "a4b6c71d4b7c1588587345e2dfe0c6bd7cc63a83",
"GITALY_SERVER_VERSION": "1.77.1",
"GITLAB_PAGES_VERSION": "1.12.0",
"GITLAB_SHELL_VERSION": "10.3.0",
"GITLAB_WORKHORSE_VERSION": "8.18.0"

View file

@ -17,14 +17,14 @@ let
};
};
in buildGoPackage rec {
version = "a4b6c71d4b7c1588587345e2dfe0c6bd7cc63a83";
version = "1.77.1";
pname = "gitaly";
src = fetchFromGitLab {
owner = "gitlab-org";
repo = "gitaly";
rev = version;
sha256 = "1pxmhq1nrc8q2kk83bz5afx14hshqgzqm6j4vgmyjvbmdvgl80wv";
rev = "v${version}";
sha256 = "08xc9lxlvga36yq1wdvb1h4zk70c36qspyd7azhkw84kzwfrif1c";
};
# Fix a check which assumes that hook files are writeable by their

View file

@ -327,7 +327,7 @@ group :metrics do
gem 'influxdb', '~> 0.2', require: false
# Prometheus
gem 'prometheus-client-mmap', '~> 0.9.10'
gem 'prometheus-client-mmap', '~> 0.10.0'
gem 'raindrops', '~> 0.18'
end

View file

@ -531,8 +531,8 @@ GEM
regexp_parser (~> 1.1)
regexp_property_values (~> 0.3)
json (1.8.6)
json-jwt (1.9.4)
activesupport
json-jwt (1.11.0)
activesupport (>= 4.2)
aes_key_wrap
bindata
json-schema (2.8.0)
@ -746,7 +746,7 @@ GEM
parser
unparser
procto (0.0.3)
prometheus-client-mmap (0.9.10)
prometheus-client-mmap (0.10.0)
pry (0.11.3)
coderay (~> 1.1.0)
method_source (~> 0.9.0)
@ -1283,7 +1283,7 @@ DEPENDENCIES
peek (~> 1.1)
pg (~> 1.1)
premailer-rails (~> 1.10.3)
prometheus-client-mmap (~> 0.9.10)
prometheus-client-mmap (~> 0.10.0)
pry-byebug (~> 3.5.1)
pry-rails (~> 0.3.4)
rack (~> 2.0.7)

View file

@ -2326,10 +2326,10 @@
platforms = [];
source = {
remotes = ["https://rubygems.org"];
sha256 = "065k7vffdki73f4nz89lxi6wxmcw5dlf593831pgvlbralll6x3r";
sha256 = "18rf9v20i0dk5dblr7m22di959xpch2h7gsx0cl585cryr7apwp3";
type = "gem";
};
version = "1.9.4";
version = "1.11.0";
};
json-schema = {
dependencies = ["addressable"];
@ -3365,10 +3365,10 @@
platforms = [];
source = {
remotes = ["https://rubygems.org"];
sha256 = "0immyg4as0isyj2dcjf44n0avg1jv5kx1qk0asrgb5ayzwmjqg1k";
sha256 = "00d2c79xhz5k3fcclarjr1ffxbrvc6236f4rrvriad9kwqr7c1mp";
type = "gem";
};
version = "0.9.10";
version = "0.10.0";
};
pry = {
dependencies = ["coderay" "method_source"];

View file

@ -18,7 +18,7 @@ in stdenv.mkDerivation rec {
src = fetchFromGitHub {
owner = "Big-B";
repo = pname;
repo = "swaylock-fancy";
rev = "35618ceec70338047355b6b057825e68f16971b5";
sha256 = "06fjqwblmj0d9pq6y11rr73mizirna4ixy6xkvblf1c7sn5n8lpc";
};

View file

@ -100,9 +100,9 @@ stdenv.mkDerivation (args // {
'' + stdenv.lib.optionalString verifyCargoDeps ''
if ! diff source/Cargo.lock $cargoDeps/Cargo.lock ; then
echo
echo "ERROR: cargoSha256 is out of date."
echo "ERROR: cargoSha256 is out of date"
echo
echo "Cargo.lock is not the same in $cargoDeps."
echo "Cargo.lock is not the same in $cargoDeps"
echo
echo "To fix the issue:"
echo '1. Use "1111111111111111111111111111111111111111111111111111" as the cargoSha256 value'

View file

@ -2,7 +2,7 @@
let
pname = "victor-mono";
version = "1.3.0";
version = "1.3.1";
in fetchFromGitHub rec {
name = "${pname}-${version}";
@ -26,7 +26,7 @@ in fetchFromGitHub rec {
unzip -j VictorMonoAll.zip \*.otf -d $out/share/fonts/opentype/${pname}
'';
sha256 = "1lv2x7kfspabnhvm8z79n165fw3awvzj1r8f0g5zn26wgdalgw69";
sha256 = "1yj91rhs9pd705406r4lqabdfzjclbz837nzm6z1rziy6mbpd61s";
meta = with lib; {
description = "Free programming font with cursive italics and ligatures";

View file

@ -26,11 +26,11 @@
stdenv.mkDerivation rec {
pname = "seahorse";
version = "3.34";
version = "3.34.1";
src = fetchurl {
url = "mirror://gnome/sources/${pname}/${stdenv.lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
sha256 = "16sfnqrdlr5xx6kixx2ln1mva7nngjlw1k3f5n454vyaigffjh2v";
sha256 = "19c2zylwgycb5q9hal8rmflc2sywc5c2grpsfsq3rf37i9lfwynw";
};
doCheck = true;

View file

@ -1,35 +1,33 @@
{ stdenv, fetchFromGitHub, ninja, nodejs, python3 }:
let
version = "6.2.1";
ocaml-version = "4.06.1";
src = fetchFromGitHub {
owner = "BuckleScript";
repo = "bucklescript";
rev = "${version}";
sha256 = "0zx9nq7cik0c60n3rndqfqy3vdbj5lcrx6zcqcz2d60jjxi1z32y";
fetchSubmodules = true;
};
ocaml = import ./ocaml.nix {
bs-version = version;
# This file is based on https://github.com/turboMaCk/bs-platform.nix/blob/master/build-bs-platform.nix
# to make potential future updates simpler
{ stdenv, fetchFromGitHub, ninja, runCommand, nodejs, python3,
ocaml-version, version, src,
ocaml ? (import ./ocaml.nix {
version = ocaml-version;
inherit stdenv;
src = "${src}/ocaml";
};
in
}),
custom-ninja ? (ninja.overrideAttrs (attrs: {
src = runCommand "ninja-patched-source" {} ''
mkdir -p $out
tar zxvf ${src}/vendor/ninja.tar.gz -C $out
'';
patches = [];
}))
}:
stdenv.mkDerivation {
inherit src version;
pname = "bs-platform";
BS_RELEASE_BUILD = "true";
buildInputs = [ nodejs python3 ];
buildInputs = [ nodejs python3 custom-ninja ];
patchPhase = ''
sed -i 's:./configure.py --bootstrap:python3 ./configure.py --bootstrap:' ./scripts/install.js
mkdir -p ./native/${ocaml-version}/bin
ln -sf ${ocaml}/bin/* ./native/${ocaml-version}/bin
ln -sf ${ocaml}/bin/* ./native/${ocaml-version}/bin
rm -f vendor/ninja/snapshot/ninja.linux
cp ${ninja}/bin/ninja vendor/ninja/snapshot/ninja.linux
cp ${custom-ninja}/bin/ninja vendor/ninja/snapshot/ninja.linux
'';
configurePhase = ''
@ -42,12 +40,9 @@ stdenv.mkDerivation {
installPhase = ''
node scripts/install.js
mkdir -p $out/bin
cp -rf jscomp lib vendor odoc_gen native $out
cp bsconfig.json package.json $out
ln -s $out/lib/bsb $out/bin/bsb
ln -s $out/lib/bsc $out/bin/bsc
ln -s $out/lib/bsrefmt $out/bin/bsrefmt

View file

@ -1,15 +1,28 @@
{ stdenv, fetchFromGitHub, ninja, nodejs, python3, ... }:
{ stdenv, runCommand, fetchFromGitHub, ninja, nodejs, python3, ... }:
let
build-bs-platform = import ./build-bs-platform.nix;
in
(build-bs-platform {
inherit stdenv runCommand fetchFromGitHub ninja nodejs python3;
version = "7.0.1";
ocaml-version = "4.06.1";
src = fetchFromGitHub {
owner = "BuckleScript";
repo = "bucklescript";
rev = "52770839e293ade2bcf187f2639000ca0a9a1d46";
sha256 = "0s7g2zfhshsilv9zyp0246bypg34d294z27alpwz03ws9608yr7k";
fetchSubmodules = true;
};
}).overrideAttrs (attrs: {
meta = with stdenv.lib; {
description = "A JavaScript backend for OCaml focused on smooth integration and clean generated code.";
homepage = https://bucklescript.github.io;
license = licenses.lgpl3;
maintainers = with maintainers; [ turbomack gamb ];
maintainers = with maintainers; [ turbomack gamb anmonteiro ];
platforms = platforms.all;
# Currently there is an issue with aarch build in hydra
# https://github.com/BuckleScript/bucklescript/issues/4091
badPlatforms = platforms.aarch64;
};
in
{
bs-platform-621 = import ./bs-platform-62.nix {
inherit stdenv fetchFromGitHub ninja nodejs python3;
} // { inherit meta; };
}
})

View file

@ -1,7 +1,7 @@
{ stdenv, src, version, bs-version }:
{ stdenv, src, version }:
stdenv.mkDerivation rec {
inherit src version;
name = "ocaml-${version}+bs-${bs-version}";
name = "ocaml-${version}+bs";
configurePhase = ''
./configure -prefix $out
'';

View file

@ -86,12 +86,12 @@ let
in
stdenv.mkDerivation (rec {
version = "8.10.0.20191210";
version = "8.10.0.20200108";
name = "${targetPrefix}ghc-${version}";
src = fetchurl {
url = "https://downloads.haskell.org/ghc/8.10.1-alpha2/ghc-${version}-src.tar.xz";
sha256 = "1mmv8s9cs41kp7wh1qqnzin5wv32cvs3lmzgda7njz0ssqb0mmvj";
url = "https://downloads.haskell.org/ghc/8.10.1-rc1/ghc-${version}-src.tar.xz";
sha256 = "1xm6cb3s2x3rycnyvkh12mp65xi3zbwrk5ima8sg7c245f3dl0ay";
};
enableParallelBuilding = true;

View file

@ -96,8 +96,7 @@ let
"-Dprefix=${placeholder "out"}"
"-Dman1dir=${placeholder "out"}/share/man/man1"
"-Dman3dir=${placeholder "out"}/share/man/man3"
]
++ optional (stdenv.isAarch32 || stdenv.isMips) "-Dldflags=\"-lm -lrt\"";
];
configureScript = optionalString (!crossCompiling) "${stdenv.shell} ./Configure";

View file

@ -2,6 +2,9 @@
{ python
, callPackage
, makeSetupHook
, disabledIf
, isPy3k
, ensureNewerSourcesForZipFilesHook
}:
let
@ -109,6 +112,15 @@ in rec {
};
} ./setuptools-check-hook.sh) {};
venvShellHook = disabledIf (!isPy3k) (callPackage ({ }:
makeSetupHook {
name = "venv-shell-hook";
deps = [ ensureNewerSourcesForZipFilesHook ];
substitutions = {
inherit pythonInterpreter;
};
} ./venv-shell-hook.sh) {});
wheelUnpackHook = callPackage ({ wheel }:
makeSetupHook {
name = "wheel-unpack-hook.sh";

View file

@ -0,0 +1,26 @@
venvShellHook() {
echo "Executing venvHook"
runHook preShellHook
if [ -d "${venvDir}" ]; then
echo "Skipping venv creation, '${venvDir}' already exists"
else
echo "Creating new venv environment in path: '${venvDir}'"
@pythonInterpreter@ -m venv "${venvDir}"
fi
source "${venvDir}/bin/activate"
runHook postShellHook
echo "Finished executing venvShellHook"
}
if [ -z "${dontUseVenvShellHook:-}" ] && [ -z "${shellHook-}" ]; then
echo "Using venvShellHook"
if [ -z "${venvDir-}" ]; then
echo "Error: \`venvDir\` should be set when using \`venvShellHook\`."
exit 1
else
shellHook=venvShellHook
fi
fi

View file

@ -0,0 +1,24 @@
{ stdenv, fetchFromGitHub, cmake, openal, libvorbis, opusfile, libsndfile }:
stdenv.mkDerivation rec {
pname = "alure2";
version = "unstable-2020-01-09";
src = fetchFromGitHub {
owner = "kcat";
repo = "alure";
rev = "4b7b58d3f0de444d6f26aa705704deb59145f586";
sha256 = "0ds18hhy2wpvx498z5hcpzfqz9i60ixsi0cjihyvk20rf4qy12vg";
};
nativeBuildInputs = [ cmake ];
buildInputs = [ openal libvorbis opusfile libsndfile ];
meta = with stdenv.lib; {
description = "A utility library for OpenAL, providing a C++ API and managing common tasks that include file loading, caching, and streaming";
homepage = "https://github.com/kcat/alure";
license = licenses.zlib;
platforms = platforms.linux;
maintainers = with maintainers; [ McSinyx ];
};
}

View file

@ -2,11 +2,11 @@
stdenv.mkDerivation rec {
pname = "cln";
version = "1.3.5";
version = "1.3.6";
src = fetchurl {
url = "${meta.homepage}${pname}-${version}.tar.bz2";
sha256 = "0bc43v4fyxwik9gjkvm8jan74bkx9bjssv61lfh9jhhblmj010bq";
sha256 = "0jlq9l4hphk7qqlgqj9ihjp4m3rwjbhk6q4v00lsbgbri07574pl";
};
buildInputs = [ gmp ];

View file

@ -1,4 +1,4 @@
{ stdenv, fetchFromGitHub, cmake, boost, openssl, asio }:
{ stdenv, fetchFromGitHub, cmake, boost, openssl }:
stdenv.mkDerivation rec {
pname = "cpp-netlib";
@ -14,18 +14,22 @@ stdenv.mkDerivation rec {
buildInputs = [ cmake boost openssl ];
# This can be removed when updating to 0.13, see https://github.com/cpp-netlib/cpp-netlib/issues/629
propagatedBuildInputs = [ asio ];
cmakeFlags = [
"-DCPP-NETLIB_BUILD_SHARED_LIBS=ON"
];
enableParallelBuilding = true;
# The test driver binary lacks an RPath to the library's libs
preCheck = ''
export LD_LIBRARY_PATH=$PWD/libs/network/src
'';
# Most tests make network GET requests to various websites
doCheck = false;
meta = with stdenv.lib; {
description =
"Collection of open-source libraries for high level network programming";
description = "Collection of open-source libraries for high level network programming";
homepage = https://cpp-netlib.org;
license = licenses.boost;
platforms = platforms.all;

View file

@ -4,14 +4,14 @@
}:
stdenv.mkDerivation rec {
version = "3.3";
version = "3.3.1";
pname = "glfw";
src = fetchFromGitHub {
owner = "glfw";
repo = "GLFW";
rev = version;
sha256 = "1f1hqpqffzg46z33ybs2c3akmkly7b3qmgp5byk50nvad6g2pm4p";
sha256 = "0c7nlrhq84gdq10diyv6nshjbv8410bmn0vging815pfvis208xc";
};
enableParallelBuilding = true;

View file

@ -1,4 +1,4 @@
{ stdenv, lib, fetchFromGitHub, fetchpatch, cmake, perl }:
{ stdenv, lib, fetchFromGitHub, fetchpatch, cmake, gflags, perl }:
stdenv.mkDerivation rec {
pname = "glog";
@ -20,8 +20,16 @@ stdenv.mkDerivation rec {
})
];
postPatch = lib.optionalString stdenv.isDarwin ''
# A path clash on case-insensitive file systems blocks creation of the build directory.
# The file in question is specific to bazel and does not influence the build result.
rm BUILD
'';
nativeBuildInputs = [ cmake ];
propagatedBuildInputs = [ gflags ];
cmakeFlags = [ "-DBUILD_SHARED_LIBS=ON" ];
checkInputs = [ perl ];

View file

@ -4,11 +4,11 @@
stdenv.mkDerivation rec {
pname = "leptonica";
version = "1.78.0";
version = "1.79.0";
src = fetchurl {
url = "http://www.leptonica.org/source/${pname}-${version}.tar.gz";
sha256 = "122s9b8hi93va4lgwnwrbma50x5fp740npy0s92xybd2wy0jxvg2";
sha256 = "1n004gv1dj3pq1fcnfdclvvx5nang80336aa67nvs3nnqp4ncn84";
};
nativeBuildInputs = [ autoreconfHook pkgconfig ];

View file

@ -2,13 +2,13 @@
stdenv.mkDerivation rec {
pname = "libdeflate";
version = "1.3";
version = "1.5";
src = fetchFromGitHub {
owner = "ebiggers";
repo = "libdeflate";
rev = "v${version}";
sha256 = "019xsz5dnbpxiz29j3zqsxyi4ksjkkygi6a2zyc8fxbm8lvaa9ar";
sha256 = "1v0y7998p8a8wpblnpdyk5zzvpj8pbrpzxwxmv0b0axrhaarxrf3";
};
postPatch = ''
@ -25,7 +25,7 @@ stdenv.mkDerivation rec {
description = "Fast DEFLATE/zlib/gzip compressor and decompressor";
license = licenses.mit;
homepage = https://github.com/ebiggers/libdeflate;
platforms = platforms.linux;
platforms = platforms.unix;
maintainers = with maintainers; [ orivej ];
};
}

View file

@ -102,6 +102,7 @@ in stdenv.mkDerivation rec {
] ++ optionals stdenv.isLinux [
"QEMU_BRIDGE_HELPER=/run/wrappers/bin/qemu-bridge-helper"
"QEMU_PR_HELPER=/run/libvirt/nix-helpers/qemu-pr-helper"
"EBTABLES_PATH=${ebtables}/bin/ebtables-legacy"
"--with-attr"
"--with-apparmor"
"--with-secdriver-apparmor"

View file

@ -6,13 +6,14 @@
stdenv.mkDerivation {
pname = "libvterm-neovim";
version = "2019-10-08";
# Releases are not tagged, look at commit history to find latest release
version = "0.1.3";
src = fetchFromGitHub {
owner = "neovim";
repo = "libvterm";
rev = "7c72294d84ce20da4c27362dbd7fa4b08cfc91da";
sha256 = "111qyxq33x74dwdnqcnzlv9j0n8hxyribd6ppwcsxmyrniyw9qrk";
rev = "65dbda3ed214f036ee799d18b2e693a833a0e591";
sha256 = "0r6yimzbkgrsi9aaxwvxahai2lzgjd1ysblr6m6by5w459853q3n";
};
buildInputs = [ perl ];

View file

@ -1,16 +1,16 @@
{ stdenv, fetchFromGitHub, glibcLocales
, cmake, python3
, cmake, python3, libpng, zlib
}:
stdenv.mkDerivation rec {
pname = "onnxruntime";
version = "1.0.0";
version = "1.1.0";
src = fetchFromGitHub {
owner = "microsoft";
repo = "onnxruntime";
rev = "v${version}";
sha256 = "1d28lzrjnq69yl8j9ncxlsxl0bniacn3hnsr9van10zgp527436v";
sha256 = "1ryf5v2h07c7b42q2p9id88i270ajyz5rlsradp00dy8in6dn2yr";
# TODO: use nix-versions of grpc, onnx, eigen, googletest, etc.
# submodules increase src size and compile times significantly
# not currently feasible due to how integrated cmake build is with git
@ -25,12 +25,19 @@ stdenv.mkDerivation rec {
python3 # for shared-lib or server
];
buildInputs = [
# technically optional, but highly recommended
libpng
zlib
];
cmakeDir = "../cmake";
cmakeFlags = [
"-Donnxruntime_USE_OPENMP=ON"
"-Donnxruntime_BUILD_SHARED_LIB=ON"
"-Donnxruntime_ENABLE_LTO=ON"
# flip back to ON next release
"-Donnxruntime_ENABLE_LTO=OFF" # https://github.com/microsoft/onnxruntime/issues/2828
];
# ContribOpTest.StringNormalizerTest sets locale to en_US.UTF-8"

View file

@ -36,7 +36,7 @@ let
outputs = [ "bin" "dev" "out" "man" ] ++ optional withDocs "doc";
setOutputFlags = false;
separateDebugInfo = stdenv.hostPlatform.isLinux;
separateDebugInfo = stdenv.cc.isGNU;
nativeBuildInputs = [ perl ];
buildInputs = stdenv.lib.optional withCryptodev cryptodev;

View file

@ -12,8 +12,8 @@ stdenv.mkDerivation rec {
patches = [
./darwin.patch # configure relies on impure sw_vers to -Dunix
(fetchpatch {
url = "https://phab-files.hepforge.org/file/data/j3ja4jirrdyrovrmnbuh/PHID-FILE-6vnor4aoz3s2ejruisrg/file";
sha256 = "0flxv08wcd0m5di75s2zvm015k2k70nqgpcgcbq7m604z26pd6ab";
url = "https://gitlab.com/hepcedar/rivet/commit/37bd34f52cce66946ebb311a8fe61bfc5f69cc00.diff";
sha256 = "0wj3ilpfq2gpc33bj3800l9vyvc9lrrlj1x9ss5qki0yiqd8i2aa";
})
];

View file

@ -2,11 +2,11 @@
stdenv.mkDerivation rec {
pname = "htslib";
version = "1.9";
version = "1.10.2";
src = fetchurl {
url = "https://github.com/samtools/htslib/releases/download/${version}/${pname}-${version}.tar.bz2";
sha256 = "16ljv43sc3fxmv63w7b2ff8m1s7h89xhazwmbm1bicz8axq8fjz0";
sha256 = "0f8rglbvf4aaw41i2sxlpq7pvhly93sjqiz0l4q3hwki5zg47dg3";
};
# perl is only used during the check phase.

View file

@ -0,0 +1,23 @@
{ lib, fetchzip, ppx_deriving, ppxfind, buildDunePackage }:
buildDunePackage rec {
pname = "lens";
version = "1.2.3";
src = fetchzip {
url = "https://github.com/pdonadeo/ocaml-lens/archive/v${version}.tar.gz";
sha256 = "09k2vhzysx91syjhgv6w1shc9mgzi0l4bhwpx1g5pi4r4ghjp07y";
};
minimumOCamlVersion = "4.04.1";
buildInputs = [ ppx_deriving ppxfind ];
meta = with lib; {
homepage = https://github.com/pdonadeo/ocaml-lens;
description = "Functional lenses";
license = licenses.bsd3;
maintainers = with maintainers; [
kazcw
];
};
}

View file

@ -1,24 +1,22 @@
{ stdenv, fetchurl, sqlite, ocaml, findlib, ocamlbuild, pkgconfig }:
{ lib, fetchurl, sqlite, pkgconfig, buildDunePackage }:
stdenv.mkDerivation rec {
pname = "ocaml-sqlite3";
version = "2.0.9";
buildDunePackage rec {
pname = "sqlite3";
version = "5.0.1";
minimumOCamlVersion = "4.05";
src = fetchurl {
url = "https://github.com/mmottl/sqlite3-ocaml/releases/download/v${version}/sqlite3-ocaml-${version}.tar.gz";
sha256 = "0rwsx1nfa3xqmbygim2qx45jqm1gwf08m70wmcwkx50f1qk3l551";
url = "https://github.com/mmottl/sqlite3-ocaml/releases/download/${version}/sqlite3-${version}.tbz";
sha256 = "0iymkszrs6qwak0vadfzc8yd8jfwn06zl08ggb4jr2mgk2c8mmsn";
};
nativeBuildInputs = [ pkgconfig ];
buildInputs = [ ocaml findlib ocamlbuild sqlite ];
buildInputs = [ sqlite ];
createFindlibDestdir = true;
meta = with stdenv.lib; {
meta = with lib; {
homepage = http://mmottl.github.io/sqlite3-ocaml/;
description = "OCaml bindings to the SQLite 3 database access library";
license = licenses.mit;
platforms = ocaml.meta.platforms or [];
maintainers = with maintainers; [
maggesi vbgl
];

View file

@ -8,10 +8,10 @@ stdenv.mkDerivation {
sha256 = "1w2saw7zanf9m9ffvz2lvcxvlm118pws2x1wym526xmydhqpyfa7";
};
nativeBuildInputs = [ ocaml ocamlbuild findlib opaline ];
buildInputs = [ findlib ocaml ocamlbuild opaline ];
nativeBuildInputs = [ ocaml ocamlbuild findlib ];
buildInputs = [ findlib ocaml ocamlbuild ];
buildPhase = "ocaml pkg/build.ml native=true native-dynlink=${if withShared then "true" else "false"}";
installPhase = "opaline -libdir $OCAMLFIND_DESTDIR";
installPhase = "${opaline}/bin/opaline -libdir $OCAMLFIND_DESTDIR";
configurePlatforms = [];
meta = {

View file

@ -0,0 +1,22 @@
{ lib, stdenv, buildPythonPackage, fetchPypi, isPy3k }:
buildPythonPackage rec {
pname = "avro-python3";
version = "1.8.2";
disabled = !isPy3k;
src = fetchPypi {
inherit pname version;
sha256 = "f82cf0d66189600b1e6b442f650ad5aca6c189576723dcbf6f9ce096eab81bd6";
};
doCheck = false; # No such file or directory: './run_tests.py
meta = with lib; {
description = "A serialization and RPC framework";
homepage = https://pypi.python.org/pypi/avro-python3/;
license = licenses.asl20;
maintainers = [ maintainers.shlevy maintainers.timma ];
};
}

View file

@ -1,4 +1,4 @@
{ lib, buildPythonPackage, fetchFromGitHub, pythonOlder
{ lib, buildPythonPackage, fetchFromGitHub, fetchpatch, pythonOlder
, six, typing, pygments
, django, shortuuid, python-dateutil, pytest
, pytest-django, pytestcov, mock, vobject
@ -16,6 +16,15 @@ buildPythonPackage rec {
sha256 = "0053yqq4vq3mwy7zkfs5vfm3g8j9sfy3vrc6xby83qlj9wz43ipi";
};
# This patch fixes a single failing test and can be removed when updating this pkg
# to the next version
patches = [
(fetchpatch {
url = "https://github.com/django-extensions/django-extensions/commit/1d21786da2e6868d98ae34c82079e1e03ad1aa97.patch";
sha256 = "0d81zpj0f8a7ijrfb12j0b67fgj89k3axaskz1nwqsr4wc6n4bw2";
})
];
postPatch = ''
substituteInPlace setup.py --replace "'tox'," ""

View file

@ -0,0 +1,27 @@
{ lib, fetchFromGitHub, buildPythonPackage, python, lxml }:
buildPythonPackage rec {
pname = "gpxpy";
version = "1.3.5";
src = fetchFromGitHub {
owner = "tkrajina";
repo = pname;
rev = "v${version}";
sha256 = "18r7pfda7g3l0hv8j9565n52cvvgjxiiqqzagfdfaba1djgl6p8b";
};
propagatedBuildInputs = [ lxml ];
checkPhase = ''
${python.interpreter} -m unittest test
'';
meta = with lib; {
description = "Python GPX (GPS eXchange format) parser";
homepage = "https://github.com/tkrajina/gpxpy";
license = licenses.asl20;
platforms = platforms.unix;
maintainers = with maintainers; [ sikmir ];
};
}

View file

@ -0,0 +1,78 @@
{ lib
, fetchpatch
, buildPythonPackage
, fetchPypi
, pythonOlder
, isPy27
, cmake
, protobuf
, numpy
, six
, typing-extensions
, typing
, pytestrunner
, pytest
, nbval
, tabulate
}:
buildPythonPackage rec {
pname = "onnx";
version = "1.6.0";
# Due to Protobuf packaging issues this build of Onnx with Python 2 gives
# errors on import
disabled = isPy27;
src = fetchPypi {
inherit pname version;
sha256 = "0ig33jl3591041lyylxp52yi20rfrcqx3i030hd6al8iabzc721v";
};
# Remove the unqualified requirement for the typing package for running the
# tests. typing is already required for the installation, where it is
# correctly qualified so as to only be required for sufficiently old Python
# versions.
# This patch should be in the next release (>1.6).
patches = [
(fetchpatch {
url = "https://github.com/onnx/onnx/commit/c963586d0f8dd5740777b2fd06f04ec60816de9f.patch";
sha256 = "1hl26cw5zckc91gmh0bdah87jyprccxiw0f4i5h1gwkq28hm6wbj";
})
];
nativeBuildInputs = [ cmake ];
propagatedBuildInputs = [
protobuf
numpy
six
typing-extensions
] ++ lib.optional (pythonOlder "3.5") [ typing ];
checkInputs = [
pytestrunner
pytest
nbval
tabulate
];
postPatch = ''
patchShebangs tools/protoc-gen-mypy.py
'';
# The executables are just utility scripts that aren't too important
postInstall = ''
rm -r $out/bin
'';
# The setup.py does all the configuration (running CMake)
dontConfigure = true;
meta = {
homepage = http://onnx.ai;
description = "Open Neural Network Exchange";
license = lib.licenses.mit;
maintainers = [ lib.maintainers.acairncross ];
};
}

View file

@ -10,11 +10,8 @@ buildPythonPackage rec {
};
# fix the ASCII-mode LICENSE file read
# disable test_fetch and the doctests (which also invoke fetch)
patchPhase = stdenv.lib.optionalString isPy3k ''
sed -i "s/)\.read(/,encoding='utf-8'\0/" setup.py
'' + ''
postPatch = ''
sed -i -e "/def test_fetch/i\\
\\t@unittest.skip('requires internet')" -e "/def additional_tests():/,+1d" tests.py
'';

View file

@ -0,0 +1,37 @@
{ buildPythonPackage
, fetchFromGitHub
, isPy3k
, lib
# pythonPackages
, pylint-plugin-utils
}:
buildPythonPackage rec {
pname = "pylint-celery";
version = "0.3";
disabled = !isPy3k;
src = fetchFromGitHub {
owner = "PyCQA";
repo = pname;
rev = version;
sha256 = "05fhwraq12c2724pn4py1bjzy5rmsrb1x68zck73nlp5icba6yap";
};
propagatedBuildInputs = [
pylint-plugin-utils
];
# Testing requires a very old version of pylint, incompatible with other dependencies
doCheck = false;
meta = with lib; {
description = "A Pylint plugin to analyze Celery applications";
homepage = "https://github.com/PyCQA/pylint-celery";
license = licenses.gpl2;
maintainers = with maintainers; [
kamadorueda
];
};
}

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