1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-20 04:31:52 +00:00

Merge staging-next into staging

This commit is contained in:
github-actions[bot] 2021-09-23 00:03:12 +00:00 committed by GitHub
commit c836da689f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
133 changed files with 2673 additions and 1464 deletions

5
.github/CODEOWNERS vendored
View file

@ -231,3 +231,8 @@
# Cinnamon
/pkgs/desktops/cinnamon @mkg20001
#nim
/pkgs/development/compilers/nim @ehmry
/pkgs/development/nim-packages @ehmry
/pkgs/top-level/nim-packages.nix @ehmry

6
.github/labeler.yml vendored
View file

@ -72,6 +72,12 @@
- nixos/**/*
- pkgs/os-specific/linux/nixos-rebuild/**/*
"6.topic: nim":
- doc/languages-frameworks/nim.section.md
- pkgs/development/compilers/nim/*
- pkgs/development/nim-packages/**/*
- pkgs/top-level/nim-packages.nix
"6.topic: ocaml":
- doc/languages-frameworks/ocaml.section.md
- pkgs/development/compilers/ocaml/**/*

View file

@ -23,6 +23,7 @@
<xi:include href="javascript.section.xml" />
<xi:include href="lua.section.xml" />
<xi:include href="maven.section.xml" />
<xi:include href="nim.section.xml" />
<xi:include href="ocaml.section.xml" />
<xi:include href="octave.section.xml" />
<xi:include href="perl.section.xml" />

View file

@ -0,0 +1,91 @@
# Nim {#nim}
## Overview {#nim-overview}
The Nim compiler, a builder function, and some packaged libraries are available
in Nixpkgs. Until now each compiler release has been effectively backwards
compatible so only the latest version is available.
## Nim program packages in Nixpkgs {#nim-program-packages-in-nixpkgs}
Nim programs can be built using `nimPackages.buildNimPackage`. In the
case of packages not containing exported library code the attribute
`nimBinOnly` should be set to `true`.
The following example shows a Nim program that depends only on Nim libraries:
```nix
{ lib, nimPackages, fetchurl }:
nimPackages.buildNimPackage rec {
pname = "hottext";
version = "1.4";
nimBinOnly = true;
src = fetchurl {
url = "https://git.sr.ht/~ehmry/hottext/archive/v${version}.tar.gz";
sha256 = "sha256-hIUofi81zowSMbt1lUsxCnVzfJGN3FEiTtN8CEFpwzY=";
};
buildInputs = with nimPackages; [
bumpy
chroma
flatty
nimsimd
pixie
sdl2
typography
vmath
zippy
];
}
```
## Nim library packages in Nixpkgs {#nim-library-packages-in-nixpkgs}
Nim libraries can also be built using `nimPackages.buildNimPackage`, but
often the product of a fetcher is sufficient to satisfy a dependency.
The `fetchgit`, `fetchFromGitHub`, and `fetchNimble` functions yield an
output that can be discovered during the `configurePhase` of `buildNimPackage`.
Nim library packages are listed in
[pkgs/top-level/nim-packages.nix](https://github.com/NixOS/nixpkgs/blob/master/pkgs/top-level/nim-packages.nix) and implemented at
[pkgs/development/nim-packages](https://github.com/NixOS/nixpkgs/tree/master/pkgs/development/nim-packages).
The following example shows a Nim library that propagates a dependency on a
non-Nim package:
```nix
{ lib, buildNimPackage, fetchNimble, SDL2 }:
buildNimPackage rec {
pname = "sdl2";
version = "2.0.4";
src = fetchNimble {
inherit pname version;
hash = "sha256-Vtcj8goI4zZPQs2TbFoBFlcR5UqDtOldaXSH/+/xULk=";
};
propagatedBuildInputs = [ SDL2 ];
}
```
## `buildNimPackage` parameters {#buildnimpackage-parameters}
All parameters from `stdenv.mkDerivation` function are still supported. The
following are specific to `buildNimPackage`:
* `nimBinOnly ? false`: If `true` then build only the programs listed in
the Nimble file in the packages sources.
* `nimbleFile`: Specify the Nimble file location of the package being built
rather than discover the file at build-time.
* `nimRelease ? true`: Build the package in *release* mode.
* `nimDefines ? []`: A list of Nim defines. Key-value tuples are not supported.
* `nimFlags ? []`: A list of command line arguments to pass to the Nim compiler.
Use this to specify defines with arguments in the form of `-d:${name}=${value}`.
* `nimDoc` ? false`: Build and install HTML documentation.
* `buildInputs` ? []: The packages listed here will be searched for `*.nimble`
files which are used to populate the Nim library path. Otherwise the standard
behavior is in effect.

View file

@ -2743,6 +2743,12 @@
githubId = 40633781;
name = "Sergei S.";
};
dit7ya = {
email = "7rat13@gmail.com";
github = "dit7ya";
githubId = 14034137;
name = "Mostly Void";
};
dizfer = {
email = "david@izquierdofernandez.com";
github = "dizfer";
@ -5189,6 +5195,12 @@
githubId = 9866621;
name = "Jack";
};
jkarlson = {
email = "jekarlson@gmail.com";
github = "jkarlson";
githubId = 1204734;
name = "Emil Karlson";
};
jlesquembre = {
email = "jl@lafuente.me";
github = "jlesquembre";
@ -7667,6 +7679,12 @@
githubId = 6455574;
name = "Matt Votava";
};
mvs = {
email = "mvs@nya.yt";
github = "illdefined";
githubId = 772914;
name = "Mikael Voss";
};
maxwilson = {
email = "nixpkgs@maxwilson.dev";
github = "mwilsoncoding";

View file

@ -111,7 +111,7 @@ in {
};
services.mail.sendmailSetuidWrapper = mkIf cfg.setSendmail
security.wrappers.smtpctl // { program = "sendmail"; };
(security.wrappers.smtpctl // { program = "sendmail"; });
systemd.tmpfiles.rules = [
"d /var/spool/smtpd 711 root - - -"

View file

@ -26,12 +26,16 @@ in
config = mkIf cfg.enable {
environment.systemPackages = [ pkgs.safeeyes ];
systemd.user.services.safeeyes = {
description = "Safeeyes";
wantedBy = [ "graphical-session.target" ];
partOf = [ "graphical-session.target" ];
path = [ pkgs.alsa-utils ];
startLimitIntervalSec = 350;
startLimitBurst = 10;
serviceConfig = {

View file

@ -13,13 +13,13 @@
mkDerivation rec {
pname = "ptcollab";
version = "0.4.2";
version = "0.4.3";
src = fetchFromGitHub {
owner = "yuxshao";
repo = "ptcollab";
rev = "v${version}";
sha256 = "sha256-AeIjc+FoFsTcyWl261GvyySIHP107rL4JkuMXFhnPbk=";
sha256 = "sha256-bFFWPl7yaTwCKz7/f9Vk6mg0roUnig0dFERS4IE4R7g=";
};
nativeBuildInputs = [ qmake pkg-config ];

View file

@ -1,12 +1,12 @@
{ lib, stdenv, fetchurl, dee, gtk2, intltool, libdbusmenu-gtk2, libunity, pkg-config, rsync }:
{ lib, stdenv, fetchurl, dee, gtk3, intltool, libdbusmenu-gtk3, libunity, pkg-config, rsync }:
stdenv.mkDerivation rec {
version = "1.2.8";
version = "1.3.0";
pname = "grsync";
src = fetchurl {
url = "mirror://sourceforge/grsync/grsync-${version}.tar.gz";
sha256 = "1c86jch73cy7ig9k4shvcd3jnaxk7jppfcr8nmkz8gbylsn5zsll";
sha256 = "sha256-t8fGpi4FMC2DF8OHQefXHvmrRjnuW/8mIqODsgQ6Nfw=";
};
nativeBuildInputs = [
@ -16,8 +16,8 @@ stdenv.mkDerivation rec {
buildInputs = [
dee
gtk2
libdbusmenu-gtk2
gtk3
libdbusmenu-gtk3
libunity
rsync
];

View file

@ -57,6 +57,9 @@ in buildPythonApplication rec {
# safeeyes images
--prefix XDG_DATA_DIRS : "$out/lib/${python.libPrefix}/site-packages/usr/share"
)
mkdir -p $out/share/applications
cp -r safeeyes/platform/icons $out/share/
cp safeeyes/platform/safeeyes.desktop $out/share/applications/
'';
doCheck = false; # no tests

View file

@ -2,13 +2,13 @@
python3Packages.buildPythonApplication rec {
pname = "skytemple";
version = "1.3.0";
version = "1.3.1";
src = fetchFromGitHub {
owner = "SkyTemple";
repo = pname;
rev = version;
sha256 = "03qmjp257rk4p1zkz89cv26awdgngvakqyg6jc3g6xrhmsvr4r2p";
sha256 = "13vvsp47frgq5c2wfllkg4lmsy5vxl53j5rw9c84d5xix5bisk1n";
};
buildInputs = [
@ -41,6 +41,6 @@ python3Packages.buildPythonApplication rec {
homepage = "https://github.com/SkyTemple/skytemple";
description = "ROM hacking tool for Pokémon Mystery Dungeon Explorers of Sky";
license = licenses.gpl3Plus;
maintainers = with maintainers; [ xfix ];
maintainers = with maintainers; [ xfix marius851000 ];
};
}

View file

@ -20,17 +20,17 @@
mkDerivation rec {
pname = "angelfish";
version = "21.06";
version = "21.08";
src = fetchurl {
url = "mirror://kde/stable/plasma-mobile/${version}/angelfish-${version}.tar.xz";
sha256 = "sha256-iHgmG/DeaUPnRXlVIU8P/oUcYINienYmR2zI9Q4Yd3s=";
sha256 = "1gzvlha159bw767mj8lisn89592j4j4dazzfws3v4anddjh60xnh";
};
cargoDeps = rustPlatform.fetchCargoTarball {
inherit src;
name = "${pname}-${version}";
sha256 = "0zh0kli7kav18v9znq2f5jklhf3m1kyb41jzmivjx70g9xyfzlwk";
sha256 = "1pbvw9hdzn3i97mahdy9y6jnjsmwmjs3lxfz7q6r9r10i8swbkak";
};
nativeBuildInputs = [
@ -63,7 +63,7 @@ mkDerivation rec {
meta = with lib; {
description = "Web browser for Plasma Mobile";
homepage = "https://apps.kde.org/en/mobile.angelfish";
homepage = "https://invent.kde.org/plasma-mobile/angelfish";
license = licenses.gpl3Plus;
maintainers = with maintainers; [ dotlambda ];
};

View file

@ -2,24 +2,25 @@
let
version = "0.17.2";
sha256 = "0kcdx4ldnshk4pqq37a7p08xr5cpsjrbrifk9fc3jbiw39m09mhf";
manifestsSha256 = "1v6md4xh4sq1vmb5a8qvb66l101fq75lmv2s4j2z3walssb5mmgj";
manifests = fetchzip {
url = "https://github.com/fluxcd/flux2/releases/download/v${version}/manifests.tar.gz";
sha256 = "1v6md4xh4sq1vmb5a8qvb66l101fq75lmv2s4j2z3walssb5mmgj";
sha256 = manifestsSha256;
stripRoot = false;
};
in
buildGoModule rec {
inherit version;
pname = "fluxcd";
inherit version;
src = fetchFromGitHub {
owner = "fluxcd";
repo = "flux2";
rev = "v${version}";
sha256 = "0kcdx4ldnshk4pqq37a7p08xr5cpsjrbrifk9fc3jbiw39m09mhf";
inherit sha256;
};
vendorSha256 = "sha256-glifJ0V3RwS7E6EWZsCa88m0MK883RhPSXCsAmMggVs=";
@ -50,6 +51,8 @@ buildGoModule rec {
done
'';
passthru.updateScript = ./update.sh;
meta = with lib; {
description = "Open and extensible continuous delivery solution for Kubernetes";
longDescription = ''

View file

@ -0,0 +1,31 @@
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p curl gnugrep gnused jq
set -eu -o pipefail
cd $(dirname "${BASH_SOURCE[0]}")
TAG=$(curl ${GITHUB_TOKEN:+" -u \":$GITHUB_TOKEN\""} --silent https://api.github.com/repos/fluxcd/flux2/releases/latest | jq -r '.tag_name')
VERSION=$(echo ${TAG} | sed 's/^v//')
SHA256=$(nix-prefetch-url --quiet --unpack https://github.com/fluxcd/flux2/archive/refs/tags/${TAG}.tar.gz)
SPEC_SHA256=$(nix-prefetch-url --quiet --unpack https://github.com/fluxcd/flux2/releases/download/${TAG}/manifests.tar.gz)
setKV () {
sed -i "s/$1 = \".*\"/$1 = \"$2\"/" ./default.nix
}
setKV version ${VERSION}
setKV sha256 ${SHA256}
setKV manifestsSha256 ${SPEC_SHA256}
setKV vendorSha256 ""
cd ../../../../../
set +e
VENDOR_SHA256=$(nix-build --no-out-link -A fluxcd 2>&1 | grep "got:" | cut -d':' -f2 | sed 's/ //g')
set -e
cd - > /dev/null
setKV vendorSha256 ${VENDOR_SHA256}

View file

@ -20,13 +20,13 @@ let
"${electron}/bin/electron";
in nodePackages.deltachat-desktop.override rec {
pname = "deltachat-desktop";
version = "1.21.1";
version = "1.22.1";
src = fetchFromGitHub {
owner = "deltachat";
repo = "deltachat-desktop";
rev = "v${version}";
sha256 = "0d59z0mvi70i26d79s4h0sssclwcakidhvhq56zi78bkfqlx7xf1";
sha256 = "0wrwjblpw3f5ky697b2nhi9lisn4q5bl05086fdkx5v5j2ghz3n9";
};
nativeBuildInputs = [

View file

@ -1,6 +1,6 @@
{
"name": "deltachat-desktop",
"version": "1.21.1",
"version": "1.22.1",
"dependencies": {
"@blueprintjs/core": "^3.22.3",
"@mapbox/geojson-extent": "^1.0.0",

View file

@ -1,5 +1,4 @@
{ branch ? "stable", pkgs }:
# Generated by ./update-discord.sh
let
inherit (pkgs) callPackage fetchurl;
in {
@ -7,30 +6,30 @@ in {
pname = "discord";
binaryName = "Discord";
desktopName = "Discord";
version = "0.0.15";
version = "0.0.16";
src = fetchurl {
url = "https://dl.discordapp.net/apps/linux/${version}/discord-${version}.tar.gz";
sha256 = "0pn2qczim79hqk2limgh88fsn93sa8wvana74mpdk5n6x5afkvdd";
sha256 = "UTVKjs/i7C/m8141bXBsakQRFd/c//EmqqhKhkr1OOk=";
};
};
ptb = callPackage ./base.nix rec {
pname = "discord-ptb";
binaryName = "DiscordPTB";
desktopName = "Discord PTB";
version = "0.0.25";
version = "0.0.26";
src = fetchurl {
url = "https://dl-ptb.discordapp.net/apps/linux/${version}/discord-ptb-${version}.tar.gz";
sha256 = "082ygmsycicddpkv5s03vw3rjkrk4lgprq29z8b1hdjifvw93b21";
sha256 = "1rlj76yhxjwwfmdln3azjr69hvfx1bjqdg9jhdn4fp6mlirkrcq4";
};
};
canary = callPackage ./base.nix rec {
pname = "discord-canary";
binaryName = "DiscordCanary";
desktopName = "Discord Canary";
version = "0.0.130";
version = "0.0.131";
src = fetchurl {
url = "https://dl-canary.discordapp.net/apps/linux/${version}/discord-canary-${version}.tar.gz";
sha256 = "sha256-UamSiwjR68Pfm3uyHaI871VaGwIKJ5DShl8uE3rvX+U=";
sha256 = "087rzyivk0grhc73v7ldxxghks0n16ifrvpmk95vzaw99l9xv0v5";
};
};
}.${branch}

View file

@ -9,11 +9,11 @@ let
in stdenv.mkDerivation rec {
pname = "msmtp";
version = "1.8.15";
version = "1.8.16";
src = fetchurl {
url = "https://marlam.de/${pname}/releases/${pname}-${version}.tar.xz";
sha256 = "sha256-ImXcY56/Lt8waf/+CjvXZ0n4tY9AAdXN6uGYc5SQmc4=";
sha256 = "1n271yr83grpki9szdirnk6wb5rcc319f0gmfabyw3fzyf4msjy0";
};
patches = [

View file

@ -0,0 +1,25 @@
{ lib, buildGoModule, fetchFromGitHub, pkg-config, pulseaudio }:
buildGoModule rec {
pname = "kappanhang";
version = "1.3";
src = fetchFromGitHub {
owner = "nonoo";
repo = pname;
rev = "v${version}";
sha256 = "1ycy8avq5s7zspfi0d9klqcwwkpmcaz742cigd7pmcnbbhspcicp";
};
nativeBuildInputs = [ pkg-config ];
buildInputs = [ pulseaudio ];
vendorSha256 = "1srjngcis42wfskwfqxxj101y9xyzrans1smy53bh1c9zm856xha";
meta = with lib; {
homepage = "https://github.com/nonoo/kappanhang";
description = "Remote control for Icom radio transceivers";
license = licenses.mit;
maintainers = with maintainers; [ mvs ];
};
}

View file

@ -14,11 +14,11 @@
mkDerivation rec {
pname = "kstars";
version = "3.5.4";
version = "3.5.5";
src = fetchurl {
url = "mirror://kde/stable/kstars/kstars-${version}.tar.xz";
sha256 = "sha256-JCdSYcogvoUmu+vB/vye+6ZMIJqVoScAKreh89dxoDU=";
sha256 = "sha256-cD31YFBnKvEPyBQils6qJxNKagDoIi8/Znfxj/Gsa0M=";
};
nativeBuildInputs = [ extra-cmake-modules kdoctools ];
@ -33,11 +33,6 @@ mkDerivation rec {
cfitsio indi-full xplanet libnova libraw gsl wcslib stellarsolver
];
# See https://bugs.kde.org/show_bug.cgi?id=439541
preConfigure = ''
rm po/de/docs/kstars/index.docbook
'';
cmakeFlags = [
"-DINDI_PREFIX=${indi-full}"
"-DXPLANET_PREFIX=${xplanet}"

View file

@ -1,23 +1,9 @@
{lib, stdenv, fetchFromGitHub, nim, htslib, pcre}:
{lib, nimPackages, fetchFromGitHub, pcre}:
let
hts-nim = fetchFromGitHub {
owner = "brentp";
repo = "hts-nim";
rev = "v0.3.4";
sha256 = "0670phk1bq3l9j2zaa8i5wcpc5dyfrc0l2a6c21g0l2mmdczffa7";
};
docopt = fetchFromGitHub {
owner = "docopt";
repo = "docopt.nim";
rev = "v0.6.7";
sha256 = "1ga7ckg21fzwwvh26jp2phn2h3pvkn8g8sm13dxif33rp471bv37";
};
in stdenv.mkDerivation rec {
nimPackages.buildNimPackage rec {
pname = "mosdepth";
version = "0.3.2";
nimBinOnly = true;
src = fetchFromGitHub {
owner = "brentp";
@ -26,15 +12,7 @@ in stdenv.mkDerivation rec {
sha256 = "sha256-uui4yC7ok+pvbXVKfBVsAarH40fnH4fnP8P4uzOqztQ=";
};
nativeBuildInputs = [ nim ];
buildInputs = [ htslib pcre ];
buildPhase = ''
HOME=$TMPDIR
nim -p:${hts-nim}/src -p:${docopt}/src c --nilseqs:on -d:release mosdepth.nim
'';
installPhase = "install -Dt $out/bin mosdepth";
buildInputs = with nimPackages; [ docopt hts-nim pcre ];
meta = with lib; {
description = "fast BAM/CRAM depth calculation for WGS, exome, or targeted sequencing";

View file

@ -1,30 +1,9 @@
{ lib, stdenv, fetchFromGitHub, nim, termbox, pcre }:
{ lib, nimPackages, fetchFromGitHub, nim, termbox, pcre }:
let
noise = fetchFromGitHub {
owner = "jangko";
repo = "nim-noise";
rev = "v0.1.14";
sha256 = "0wndiphznfyb1pac6zysi3bqljwlfwj6ziarcwnpf00sw2zni449";
};
nimbox = fetchFromGitHub {
owner = "dom96";
repo = "nimbox";
rev = "6a56e76c01481176f16ae29b7d7c526bd83f229b";
sha256 = "15x1sdfxa1xcqnr68705jfnlv83lm0xnp2z9iz3pgc4bz5vwn4x1";
};
lscolors = fetchFromGitHub {
owner = "joachimschmidt557";
repo = "nim-lscolors";
rev = "v0.3.3";
sha256 = "0526hqh46lcfsvymb67ldsc8xbfn24vicn3b8wrqnh6mag8wynf4";
};
in stdenv.mkDerivation rec {
nimPackages.buildNimPackage rec {
pname = "nimmm";
version = "0.2.0";
nimBinOnly = true;
src = fetchFromGitHub {
owner = "joachimschmidt557";
@ -33,17 +12,8 @@ in stdenv.mkDerivation rec {
sha256 = "168n61avphbxsxfq8qzcnlqx6wgvz5yrjvs14g25cg3k46hj4xqg";
};
nativeBuildInputs = [ nim ];
buildInputs = [ termbox pcre ];
buildPhase = ''
export HOME=$TMPDIR;
nim -p:${noise} -p:${nimbox} -p:${lscolors}/src c -d:release src/nimmm.nim
'';
installPhase = ''
install -Dt $out/bin src/nimmm
'';
buildInputs = [ termbox pcre ]
++ (with nimPackages; [ noise nimbox lscolors ]);
meta = with lib; {
description = "Terminal file manager written in nim";

View file

@ -4,23 +4,24 @@
, pkg-config
, glib
, glibc
, libseccomp
, systemd
, nixosTests
}:
stdenv.mkDerivation rec {
pname = "conmon";
version = "2.0.29";
version = "2.0.30";
src = fetchFromGitHub {
owner = "containers";
repo = pname;
rev = "v${version}";
sha256 = "sha256-Idt+bN9Lf6GEjdGC/sM9Ln1ohXhUy78CrmJxSDA2Y0o=";
sha256 = "sha256-NZMuHhQyo+95QTJcR79cyZr86ytkbo4nmaqTF0Bdt+s=";
};
nativeBuildInputs = [ pkg-config ];
buildInputs = [ glib systemd ]
buildInputs = [ glib libseccomp systemd ]
++ lib.optionals (!stdenv.hostPlatform.isMusl) [ glibc glibc.static ];
# manpage requires building the vendored go-md2man

View file

@ -1,8 +1,9 @@
# https://nim-lang.github.io/Nim/packaging.html
# https://nim-lang.org/docs/nimc.html
{ lib, buildPackages, stdenv, fetchurl, fetchgit, fetchFromGitHub, makeWrapper
, openssl, pcre, readline, boehmgc, sqlite, nim-unwrapped }:
{ lib, callPackage, buildPackages, stdenv, fetchurl, fetchgit, fetchFromGitHub
, makeWrapper, openssl, pcre, readline, boehmgc, sqlite, nim-unwrapped
, nimble-unwrapped }:
let
parseCpu = platform:
@ -186,138 +187,141 @@ in {
nim' = buildPackages.nim-unwrapped;
nimble' = buildPackages.nimble-unwrapped;
inherit (stdenv) targetPlatform;
in stdenv.mkDerivation {
name = "${targetPlatform.config}-nim-wrapper-${nim'.version}";
inherit (nim') version;
preferLocalBuild = true;
strictDeps = true;
self = stdenv.mkDerivation {
name = "${targetPlatform.config}-nim-wrapper-${nim'.version}";
inherit (nim') version;
preferLocalBuild = true;
strictDeps = true;
nativeBuildInputs = [ makeWrapper ];
nativeBuildInputs = [ makeWrapper ];
patches = [
./nim.cfg.patch
# Remove configurations that clash with ours
];
patches = [
./nim.cfg.patch
# Remove configurations that clash with ours
];
unpackPhase = ''
runHook preUnpack
tar xf ${nim'.src} nim-$version/config
cd nim-$version
runHook postUnpack
'';
dontConfigure = true;
buildPhase =
# Configure the Nim compiler to use $CC and $CXX as backends
# The compiler is configured by two configuration files, each with
# a different DSL. The order of evaluation matters and that order
# is not documented, so duplicate the configuration across both files.
''
runHook preBuild
cat >> config/config.nims << WTF
switch("os", "${nimTarget.os}")
switch("cpu", "${nimTarget.cpu}")
switch("define", "nixbuild")
# Configure the compiler using the $CC set by Nix at build time
import strutils
let cc = getEnv"CC"
if cc.contains("gcc"):
switch("cc", "gcc")
elif cc.contains("clang"):
switch("cc", "clang")
WTF
mv config/nim.cfg config/nim.cfg.old
cat > config/nim.cfg << WTF
os = "${nimTarget.os}"
cpu = "${nimTarget.cpu}"
define:"nixbuild"
WTF
cat >> config/nim.cfg < config/nim.cfg.old
rm config/nim.cfg.old
cat >> config/nim.cfg << WTF
clang.cpp.exe %= "\$CXX"
clang.cpp.linkerexe %= "\$CXX"
clang.exe %= "\$CC"
clang.linkerexe %= "\$CC"
gcc.cpp.exe %= "\$CXX"
gcc.cpp.linkerexe %= "\$CXX"
gcc.exe %= "\$CC"
gcc.linkerexe %= "\$CC"
WTF
runHook postBuild
unpackPhase = ''
runHook preUnpack
tar xf ${nim'.src} nim-$version/config
cd nim-$version
runHook postUnpack
'';
wrapperArgs = [
"--prefix PATH : ${lib.makeBinPath [ buildPackages.gdb ]}:${
placeholder "out"
}/bin"
# Used by nim-gdb
dontConfigure = true;
"--prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath [ openssl pcre ]}"
# These libraries may be referred to by the standard library.
# This is broken for cross-compilation because the package
# set will be shifted back by nativeBuildInputs.
buildPhase =
# Configure the Nim compiler to use $CC and $CXX as backends
# The compiler is configured by two configuration files, each with
# a different DSL. The order of evaluation matters and that order
# is not documented, so duplicate the configuration across both files.
''
runHook preBuild
cat >> config/config.nims << WTF
"--set NIM_CONFIG_PATH ${placeholder "out"}/etc/nim"
# Use the custom configuration
switch("os", "${nimTarget.os}")
switch("cpu", "${nimTarget.cpu}")
switch("define", "nixbuild")
''--set NIX_HARDENING_ENABLE "''${NIX_HARDENING_ENABLE/fortify}"''
# Fortify hardening appends -O2 to gcc flags which is unwanted for unoptimized nim builds.
];
# Configure the compiler using the $CC set by Nix at build time
import strutils
let cc = getEnv"CC"
if cc.contains("gcc"):
switch("cc", "gcc")
elif cc.contains("clang"):
switch("cc", "clang")
WTF
installPhase = ''
runHook preInstall
mv config/nim.cfg config/nim.cfg.old
cat > config/nim.cfg << WTF
os = "${nimTarget.os}"
cpu = "${nimTarget.cpu}"
define:"nixbuild"
WTF
mkdir -p $out/bin $out/etc
cat >> config/nim.cfg < config/nim.cfg.old
rm config/nim.cfg.old
cp -r config $out/etc/nim
cat >> config/nim.cfg << WTF
clang.cpp.exe %= "\$CXX"
clang.cpp.linkerexe %= "\$CXX"
clang.exe %= "\$CC"
clang.linkerexe %= "\$CC"
gcc.cpp.exe %= "\$CXX"
gcc.cpp.linkerexe %= "\$CXX"
gcc.exe %= "\$CC"
gcc.linkerexe %= "\$CC"
WTF
runHook postBuild
'';
wrapperArgs = [
"--prefix PATH : ${lib.makeBinPath [ buildPackages.gdb ]}:${
placeholder "out"
}/bin"
# Used by nim-gdb
"--prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath [ openssl pcre ]}"
# These libraries may be referred to by the standard library.
# This is broken for cross-compilation because the package
# set will be shifted back by nativeBuildInputs.
"--set NIM_CONFIG_PATH ${placeholder "out"}/etc/nim"
# Use the custom configuration
''--set NIX_HARDENING_ENABLE "''${NIX_HARDENING_ENABLE/fortify}"''
# Fortify hardening appends -O2 to gcc flags which is unwanted for unoptimized nim builds.
];
installPhase = ''
runHook preInstall
mkdir -p $out/bin $out/etc
cp -r config $out/etc/nim
for binpath in ${nim'}/bin/nim?*; do
local binname=`basename $binpath`
makeWrapper \
$binpath $out/bin/${targetPlatform.config}-$binname \
$wrapperArgs
ln -s $out/bin/${targetPlatform.config}-$binname $out/bin/$binname
done
for binpath in ${nim'}/bin/nim?*; do
local binname=`basename $binpath`
makeWrapper \
$binpath $out/bin/${targetPlatform.config}-$binname \
${nim'}/nim/bin/nim $out/bin/${targetPlatform.config}-nim \
--set-default CC $(command -v $CC) \
--set-default CXX $(command -v $CXX) \
$wrapperArgs
ln -s $out/bin/${targetPlatform.config}-$binname $out/bin/$binname
done
ln -s $out/bin/${targetPlatform.config}-nim $out/bin/nim
makeWrapper \
${nim'}/nim/bin/nim $out/bin/${targetPlatform.config}-nim \
--set-default CC $(command -v $CC) \
--set-default CXX $(command -v $CXX) \
$wrapperArgs
ln -s $out/bin/${targetPlatform.config}-nim $out/bin/nim
makeWrapper \
${nim'}/bin/testament $out/bin/${targetPlatform.config}-testament \
$wrapperArgs
ln -s $out/bin/${targetPlatform.config}-testament $out/bin/testament
makeWrapper \
${nim'}/bin/testament $out/bin/${targetPlatform.config}-testament \
$wrapperArgs
ln -s $out/bin/${targetPlatform.config}-testament $out/bin/testament
makeWrapper \
${nimble'}/bin/nimble $out/bin/${targetPlatform.config}-nimble \
--suffix PATH : $out/bin
ln -s $out/bin/${targetPlatform.config}-nimble $out/bin/nimble
makeWrapper \
${nimble'}/bin/nimble $out/bin/${targetPlatform.config}-nimble \
--suffix PATH : $out/bin
ln -s $out/bin/${targetPlatform.config}-nimble $out/bin/nimble
runHook postInstall
'';
runHook postInstall
'';
passthru = {
nim = nim';
nimble = nimble';
};
passthru = {
nim = nim';
nimble = nimble';
};
meta = nim'.meta // {
description = nim'.meta.description
+ " (${targetPlatform.config} wrapper)";
platforms = with lib.platforms; unix ++ genode;
meta = nim'.meta // {
description = nim'.meta.description
+ " (${targetPlatform.config} wrapper)";
platforms = with lib.platforms; unix ++ genode;
};
};
in self // {
pkgs = callPackage ../../../top-level/nim-packages.nix { nim = self; };
};
}

View file

@ -0,0 +1,45 @@
{ lib
, stdenv
, fetchurl
, gd
, giflib
, groff
, libpng
, tk
}:
stdenv.mkDerivation rec {
pname = "npiet";
version = "1.3f";
src = fetchurl {
url = "https://www.bertnase.de/npiet/npiet-${version}.tar.gz";
sha256 = "sha256-Le2FYGKr1zWZ6F4edozmvGC6LbItx9aptidj3KBLhVo=";
};
buildInputs = [ gd giflib libpng ];
nativeBuildInputs = [ groff ];
postPatch = ''
# malloc.h is not needed because stdlib.h is already included.
# On macOS, malloc.h does not even exist, resulting in an error.
substituteInPlace npiet-foogol.c \
--replace '#include <malloc.h>' ""
substituteInPlace npietedit \
--replace 'exec wish' 'exec ${tk}/bin/wish'
'';
meta = with lib; {
description = "An interpreter for piet programs. Also includes npietedit and npiet-foogol";
longDescription = ''
npiet is an interpreter for the piet programming language.
Instead of text, piet programs are pictures. Commands are determined based on changes in color.
'';
homepage = "https://www.bertnase.de/npiet/";
license = licenses.gpl2Only;
platforms = platforms.unix;
maintainers = with maintainers; [ Luflosi ];
};
}

View file

@ -19,13 +19,13 @@
stdenv.mkDerivation (rec {
pname = "folly";
version = "2021.09.13.00";
version = "2021.09.20.00";
src = fetchFromGitHub {
owner = "facebook";
repo = "folly";
rev = "v${version}";
sha256 = "sha256-UZfCGvhi6cWUUa56GIYMOgFHn3Ifu9uIHs983SbZCcY=";
sha256 = "sha256-aFTFUtRQOGCDR3pbpw1ViuMFm02GSq04u9GgE9pq33A=";
};
nativeBuildInputs = [

View file

@ -1,6 +1,6 @@
{ lib, stdenv
, fetchpatch, gnu-config, autoreconfHook, bison, binutils-unwrapped
, libiberty, zlib
, libiberty, libintl, zlib
}:
stdenv.mkDerivation {
@ -32,7 +32,7 @@ stdenv.mkDerivation {
strictDeps = true;
nativeBuildInputs = [ autoreconfHook bison ];
buildInputs = [ libiberty zlib.dev ];
buildInputs = [ libiberty zlib ] ++ lib.optionals stdenv.isDarwin [ libintl ];
configurePlatforms = [ "build" "host" ];
configureFlags = [

View file

@ -179,6 +179,7 @@ stdenv.mkDerivation {
''-D${if compareVersion "5.11.0" >= 0 then "LIBRESOLV_SO" else "NIXPKGS_LIBRESOLV"}="${stdenv.cc.libc.out}/lib/libresolv"''
''-DNIXPKGS_LIBXCURSOR="${libXcursor.out}/lib/libXcursor"''
] ++ lib.optional libGLSupported ''-DNIXPKGS_MESA_GL="${libGL.out}/lib/libGL"''
++ lib.optional stdenv.isLinux "-DUSE_X11"
++ lib.optionals withGtk3 [
''-DNIXPKGS_QGTK3_XDG_DATA_DIRS="${gtk3}/share/gsettings-schemas/${gtk3.name}"''
''-DNIXPKGS_QGTK3_GIO_EXTRA_MODULES="${dconf.lib}/lib/gio/modules"''

View file

@ -0,0 +1,8 @@
{ fetchFromGitHub }:
fetchFromGitHub {
owner = "krux02";
repo = "ast-pattern-matching";
rev = "87f7d163421af5a4f5e5cb6da7b93278e6897e96";
sha256 = "19mb5bb6riia8380p5dpc3q0vwgrj958dd6p7vw8vkvwiqrzg6zq";
}

View file

@ -0,0 +1,43 @@
{ lib, stdenv, nim, nim_builder }:
{ strictDeps ? true, nativeBuildInputs ? [ ], configurePhase ? null
, buildPhase ? null, checkPhase ? null, installPhase ? null, meta ? { }, ...
}@attrs:
stdenv.mkDerivation (attrs // {
inherit strictDeps;
nativeBuildInputs = [ nim nim_builder ] ++ nativeBuildInputs;
configurePhase = if isNull configurePhase then ''
runHook preConfigure
find $NIX_BUILD_TOP -name .attrs.json
nim_builder --phase:configure
runHook postConfigure
'' else
buildPhase;
buildPhase = if isNull buildPhase then ''
runHook preBuild
nim_builder --phase:build
runHook postBuild
'' else
buildPhase;
checkPhase = if isNull checkPhase then ''
runHook preCheck
nim_builder --phase:check
runHook postCheck
'' else
checkPhase;
installPhase = if isNull installPhase then ''
runHook preInstall
nim_builder --phase:install
runHook postInstall
'' else
installPhase;
meta = meta // {
maintainers = (meta.maintainers or [ ]) ++ [ lib.maintainers.ehmry ];
};
})

View file

@ -0,0 +1,7 @@
{ fetchNimble }:
fetchNimble {
pname = "bumpy";
version = "1.0.3";
hash = "sha256-mDmDlhOGoYYjKgF5j808oT2NqRlfcOdLSDE3WtdJFQ0=";
}

View file

@ -0,0 +1,19 @@
{ lib, buildNimPackage, fetchFromGitHub, SDL2 }:
buildNimPackage rec {
pname = "c2nim";
version = "0.9.18";
nimBinOnly = true;
src = fetchFromGitHub {
owner = "nim-lang";
repo = pname;
rev = version;
hash = "sha256-127ux36mfC+PnS2HIQffw+z0TSvzdQXnKRxqYV3XahU=";
};
meta = with lib;
src.meta // {
description = "Tool to translate Ansi C code to Nim";
license = licenses.mit;
maintainers = [ maintainers.ehmry ];
};
}

View file

@ -0,0 +1,7 @@
{ fetchNimble }:
fetchNimble {
pname = "chroma";
version = "0.2.5";
hash = "sha256-6lNHpO2aMorgkaPfo6kRcOs9r5R6T/kislVmkeoulw8=";
}

View file

@ -0,0 +1,8 @@
{ fetchFromGitHub }:
fetchFromGitHub {
owner = "docopt";
repo = "docopt.nim";
rev = "v0.6.7";
sha256 = "1ga7ckg21fzwwvh26jp2phn2h3pvkn8g8sm13dxif33rp471bv37";
}

View file

@ -0,0 +1,12 @@
source $stdenv/setup
export HOME=$NIX_BUILD_TOP
nimble --accept --noSSLCheck develop "${pkgname}@${version}"
# TODO: bring in the certificates for Nimble to verify the fetch of
# the package list.
pkgdir=${NIX_BUILD_TOP}/${pkgname}
find "$pkgdir" -name .git -print0 | xargs -0 rm -rf
cp -a "$pkgdir" "$out"

View file

@ -0,0 +1,20 @@
{ lib, makeOverridable, stdenv, gitMinimal, nim, cacert }:
makeOverridable (
{ pname, version, hash ? lib.fakeHash,
meta ? { }, passthru ? { }, preferLocalBuild ? true }:
stdenv.mkDerivation {
inherit version meta passthru preferLocalBuild;
pname = pname + "-src";
pkgname = pname;
builder = ./builder.sh;
nativeBuildInputs = [ gitMinimal nim ];
outputHash = hash;
outputHashAlgo = null;
outputHashMode = "recursive";
impureEnvVars = lib.fetchers.proxyImpureEnvVars
++ [ "GIT_PROXY_COMMAND" "SOCKS_SERVER" ];
GIT_SSL_CAINFO = "${cacert}/etc/ssl/certs/ca-bundle.crt";
})

View file

@ -0,0 +1,7 @@
{ fetchNimble }:
fetchNimble {
pname = "flatty";
version = "0.2.1";
hash = "sha256-TqNnRh2+i6n98ktLRVQxt9CVw17FGLNYq29rJoMus/0=";
}

View file

@ -0,0 +1,8 @@
{ fetchFromGitHub }:
fetchFromGitHub {
owner = "disruptek";
repo = "frosty";
rev = "0.3.1";
sha256 = "0hd6484ihjgl57gmqyp5xfq5prycb49k0313fqky600mhz71nmyz";
}

View file

@ -0,0 +1,13 @@
{ buildNimPackage, fetchFromGitHub, htslib }:
buildNimPackage rec {
pname = "hts-nim";
version = "0.3.4";
src = fetchFromGitHub {
owner = "brentp";
repo = pname;
rev = "v${version}";
sha256 = "0670phk1bq3l9j2zaa8i5wcpc5dyfrc0l2a6c21g0l2mmdczffa7";
};
propagatedBuildInputs = [ htslib ];
}

View file

@ -0,0 +1,8 @@
{ fetchFromGitHub }:
fetchFromGitHub {
owner = "dom96";
repo = "jester";
rev = "v0.5.0";
sha256 = "0m8a4ss4460jd2lcbqcbdd68jhcy35xg7qdyr95mh8rflwvmcvhk";
}

View file

@ -0,0 +1,8 @@
{ fetchFromGitHub }:
fetchFromGitHub {
owner = "PMunch";
repo = "jsonschema";
rev = "7b41c03e3e1a487d5a8f6b940ca8e764dc2cbabf";
sha256 = "1js64jqd854yjladxvnylij4rsz7212k31ks541pqrdzm6hpblbz";
}

View file

@ -0,0 +1,8 @@
{ fetchFromGitHub }:
fetchFromGitHub {
owner = "karaxnim";
repo = "karax";
rev = "1.1.2";
sha256 = "07ykrd21hd76vlmkqpvv5xvaxw6aaq87bky47p2420ni85a6d94j";
}

View file

@ -0,0 +1,8 @@
{ fetchFromGitHub }:
fetchFromGitHub {
owner = "joachimschmidt557";
repo = "nim-lscolors";
rev = "v0.3.3";
sha256 = "0526hqh46lcfsvymb67ldsc8xbfn24vicn3b8wrqnh6mag8wynf4";
}

View file

@ -0,0 +1,8 @@
{ fetchFromGitHub }:
fetchFromGitHub {
owner = "soasme";
repo = "nim-markdown";
rev = "abdbe5e";
sha256 = "0f3c1sxvhbbds43c9l8cz69pfpf984msj1lv4pb7bzpxb5zil2wy";
}

View file

@ -0,0 +1,19 @@
{ lib, stdenv, nim }:
stdenv.mkDerivation {
pname = "nim_builder";
inherit (nim) version;
dontUnpack = true;
nativeBuildInputs = [ nim ];
buildPhase = ''
cp ${./nim_builder.nim} nim_builder.nim
nim c --nimcache:$TMPDIR nim_builder
'';
installPhase = ''
install -Dt $out/bin nim_builder
'';
meta = {
description = "Internal Nixpkgs utility for buildNimPackage.";
maintainers = [ lib.maintainers.ehmry ];
};
}

View file

@ -0,0 +1,166 @@
# SPDX-FileCopyrightText: 2021 Nixpkgs/NixOS contributors
## Custom Nim builder for Nixpkgs.
import std/[os, osproc, parseutils, sequtils, streams, strutils]
proc findNimbleFile(): string =
## Copied from Nimble.
## Copyright (c) 2015, Dominik Picheta
## BSD3
let dir = getCurrentDir()
result = ""
var hits = 0
for kind, path in walkDir(dir):
if kind in {pcFile, pcLinkToFile}:
let ext = path.splitFile.ext
if ext == ".nimble":
result = path
inc hits
if hits >= 2:
quit("Only one .nimble file should be present in " & dir)
elif hits == 0:
quit("Could not find a file with a .nimble extension in " & dir)
proc getEnvBool(key: string; default = false): bool =
## Parse a boolean environmental variable.
let val = getEnv(key)
if val == "": default
else: parseBool(val)
proc getNimbleFilePath(): string =
## Get the Nimble file for the current package.
if existsEnv"nimbleFile":
getEnv"nimbleFile"
else:
findNimbleFile()
proc getNimbleValue(filePath, key: string; default = ""): string =
## Extract a string value from the Nimble file at ``filePath``.
var
fs = newFileStream(filePath, fmRead)
line: string
if fs.isNil:
quit("could not open " & filePath)
while fs.readline(line):
if line.startsWith(key):
var i = key.len
i.inc skipWhile(line, Whitespace, i)
if line[i] == '=':
inc i
i.inc skipWhile(line, Whitespace, i)
discard parseUntil(line, result, Newlines, i)
if result.len > 0 and result[0] == '"':
result = result.unescape
return
default
proc getNimbleValues(filePath, key: string): seq[string] =
## Extract a string sequence from the Nimble file at ``filePath``.
var gunk = getNimbleValue(filePath, key)
result = gunk.strip(chars = {'@', '[', ']'}).split(',')
if result == @[""]: reset result
apply(result) do (s: var string):
s = s.strip()
if s.len > 0 and s[0] == '"':
s = s.unescape()
proc configurePhase*() =
## Generate "config.nims" which will be read by the Nim
## compiler during later phases.
const configFilePath = "config.nims"
echo "generating ", configFilePath
let
nf = getNimbleFilePath()
mode =
if fileExists configFilePath: fmAppend
else: fmWrite
var cfg = newFileStream(configFilePath, mode)
proc switch(key, val: string) =
cfg.writeLine("switch(", key.escape, ",", val.escape, ")")
switch("backend", nf.getNimbleValue("backend", "c"))
switch("nimcache", getEnv("NIX_BUILD_TOP", ".") / "nimcache")
if getEnvBool("nimRelease", true):
switch("define", "release")
for def in getEnv("nimDefines").split:
if def != "":
switch("define", def)
for input in getEnv("buildInputs").split:
if input != "":
for nimbleFile in walkFiles(input / "*.nimble"):
let inputSrc = normalizedPath(
input / nimbleFile.getNimbleValue("srcDir", "."))
echo "found nimble input ", inputSrc
switch("path", inputSrc)
close(cfg)
proc buildPhase*() =
## Build the programs listed in the Nimble file and
## optionally some documentation.
var cmds: seq[string]
proc before(idx: int) =
echo "build job ", idx, ": ", cmds[idx]
let
nf = getNimbleFilePath()
bins = nf.getNimbleValues("bin")
srcDir = nf.getNimbleValue("srcDir", ".")
binDir = getenv("outputBin", getenv("out", "/dev/null")) / "bin"
if bins != @[]:
for bin in bins:
cmds.add("nim compile $# --outdir:$# $#" %
[getenv"nimFlags", binDir, normalizedPath(srcDir / bin)])
if getEnvBool"nimDoc":
echo "generating documentation"
let docDir = getenv("outputDoc", (getenv("out", "/dev/null") / "doc"))
for path in walkFiles(srcDir / "*.nim"):
cmds.add("nim doc --outdir:$# $#" % [docDir, path])
if cmds.len > 0:
let err = execProcesses(
cmds, n = 1,
beforeRunEvent = before)
if err != 0: quit("build phase failed", err)
proc installPhase*() =
## Install the Nim sources if ``nimBinOnly`` is not
## set in the environment.
if not getEnvBool"nimBinOnly":
let
nf = getNimbleFilePath()
srcDir = nf.getNimbleValue("srcDir", ".")
devDir = getenv("outputDev", getenv("out", "/dev/null"))
echo "Install ", srcDir, " to ", devDir
copyDir(normalizedPath(srcDir), normalizedPath(devDir / srcDir))
copyFile(nf, devDir / nf.extractFilename)
proc checkPhase*() =
## Build and run the tests in ``tests``.
var cmds: seq[string]
proc before(idx: int) =
echo "check job ", idx, ": ", cmds[idx]
for path in walkPattern("tests/t*.nim"):
cmds.add("nim r $#" % [path])
let err = execProcesses(
cmds, n = 1,
beforeRunEvent = before)
if err != 0: quit("check phase failed", err)
when isMainModule:
import std/parseopt
var phase: string
for kind, key, val in getopt():
case kind
of cmdLongOption:
case key.toLowerAscii
of "phase":
if phase != "": quit("only a single phase may be specified")
phase = val
else: quit("unhandled argument " & key)
of cmdEnd: discard
else: quit("unhandled argument " & key)
case phase
of "configure": configurePhase()
of "build": buildPhase()
of "install": installPhase()
of "check": checkPhase()
else: quit("unhandled phase " & phase)

View file

@ -0,0 +1,8 @@
{ fetchFromGitHub }:
fetchFromGitHub {
owner = "dom96";
repo = "nimbox";
rev = "6a56e76c01481176f16ae29b7d7c526bd83f229b";
sha256 = "15x1sdfxa1xcqnr68705jfnlv83lm0xnp2z9iz3pgc4bz5vwn4x1";
}

View file

@ -0,0 +1,8 @@
{ fetchFromGitHub }:
fetchFromGitHub {
owner = "cheatfate";
repo = "nimcrypto";
rev = "a5742a9a214ac33f91615f3862c7b099aec43b00";
sha256 = "0al0jsaicm8vyr63n909dq1glhvpra1n9sllmj0r7lsjsdb59wsz";
}

View file

@ -0,0 +1,7 @@
{ fetchNimble }:
fetchNimble {
pname = "nimsimd";
version = "1.0.0";
hash = "sha256-kp61fylAJ6MSN9hLYLi7CU2lxVR/lbrNCvZTe0LJLGo=";
}

View file

@ -0,0 +1,8 @@
{ fetchFromGitHub }:
fetchFromGitHub {
owner = "jangko";
repo = "nim-noise";
rev = "v0.1.14";
sha256 = "0wndiphznfyb1pac6zysi3bqljwlfwj6ziarcwnpf00sw2zni449";
}

View file

@ -0,0 +1,8 @@
{ fetchFromGitHub }:
fetchFromGitHub {
owner = "Araq";
repo = "packedjson";
rev = "7198cc8";
sha256 = "1ay2zd88q8hvpvigsg8h0y5vc65hk3lk0d48fy9hwg4lcng19mp1";
}

View file

@ -0,0 +1,7 @@
{ fetchNimble }:
fetchNimble {
pname = "pixie";
version = "1.1.3";
hash = "sha256-xKIejVxOd19mblL1ZwpJH91dgKQS5g8U08EL8lGGelA=";
}

View file

@ -0,0 +1,8 @@
{ fetchFromGitHub }:
fetchFromGitHub {
owner = "zedeus";
repo = "redis";
rev = "94bcbf1";
sha256 = "1p9zv4f4lqrjqa8fk98cb89b9fzlf866jc584ll9sws14904i80j";
}

View file

@ -0,0 +1,8 @@
{ fetchFromGitHub }:
fetchFromGitHub {
owner = "zedeus";
repo = "redpool";
rev = "57aeb25";
sha256 = "0fph7qlia6fvya1zqzbgvww2hk5pd0vq1wlf9ij9jyn655mg0w3q";
}

View file

@ -0,0 +1,8 @@
{ fetchFromGitHub }:
fetchFromGitHub {
owner = "nitely";
repo = "nim-regex";
rev = "2e32fdc";
sha256 = "1hrl40mwql7nh4wc7sdhmk8bj5728b93v5a93j49v660l0rn4qx8";
}

View file

@ -0,0 +1,13 @@
{ buildNimPackage, fetchFromGitHub, libsass }:
buildNimPackage rec {
pname = "sass";
version = "e683aa1";
src = fetchFromGitHub {
owner = "dom96";
repo = pname;
rev = version;
sha256 = "0qvly5rilsqqsyvr67pqhglm55ndc4nd6v90jwswbnigxiqf79lc";
};
propagatedBuildInputs = [ libsass ];
}

View file

@ -0,0 +1,17 @@
{ lib, buildNimPackage, fetchNimble, SDL2 }:
buildNimPackage rec {
pname = "sdl2";
version = "2.0.4";
src = fetchNimble {
inherit pname version;
hash = "sha256-Vtcj8goI4zZPQs2TbFoBFlcR5UqDtOldaXSH/+/xULk=";
};
propagatedBuildInputs = [ SDL2 ];
doCheck = true;
meta = {
description = "Nim wrapper for SDL 2.x";
platforms = lib.platforms.linux; # Problems with Darwin.
license = [ lib.licenses.mit ];
};
}

View file

@ -0,0 +1,8 @@
{ fetchFromGitHub }:
fetchFromGitHub {
owner = "nitely";
repo = "nim-segmentation";
rev = "v0.1.0";
sha256 = "007bkx8dwy8n340zbp6wyqfsq9bh6q5ykav1ywdlwykyp1n909bh";
}

View file

@ -0,0 +1,8 @@
{ fetchFromGitHub }:
fetchFromGitHub {
owner = "guzba";
repo = "supersnappy";
rev = "1.1.5";
sha256 = "1y26sgnszvdf5sn7j0jx2dpd4i03mvbk9i9ni9kbyrs798bjwi6z";
}

View file

@ -0,0 +1,7 @@
{ fetchNimble }:
fetchNimble {
pname = "typography";
version = "0.7.9";
hash = "sha256-IYjw3PCp5XzVed2fGGCt9Hb60cxFeF0BUZ7L5PedTLU=";
}

View file

@ -0,0 +1,8 @@
{ fetchFromGitHub }:
fetchFromGitHub {
owner = "nitely";
repo = "nim-unicodedb";
rev = "v0.9.0";
sha256 = "06j8d0bjbpv1iibqlmrac4qb61ggv17hvh6nv4pbccqk1rlpxhsq";
}

View file

@ -0,0 +1,8 @@
{ fetchFromGitHub }:
fetchFromGitHub {
owner = "nitely";
repo = "nim-unicodeplus";
rev = "v0.8.0";
sha256 = "181wzwivfgplkqn5r4crhnaqgsza7x6fi23i86djb2dxvm7v6qxk";
}

View file

@ -0,0 +1,7 @@
{ fetchNimble }:
fetchNimble {
pname = "vmath";
version = "1.0.3";
hash = "sha256-zzSKXjuTZ46HTFUs0N47mxEKTKIdS3dwr+60sQYSdn0=";
}

View file

@ -0,0 +1,7 @@
{ fetchNimble }:
fetchNimble {
pname = "zippy";
version = "0.5.6";
hash = "sha256-axp4t9+8TFSpvnATlRKZyuOGLA0e/XKfvrVSwreXpC4=";
}

File diff suppressed because it is too large Load diff

View file

@ -12,7 +12,7 @@
buildPythonPackage rec {
pname = "aioesphomeapi";
version = "9.1.0";
version = "9.1.1";
format = "setuptools";
disabled = pythonOlder "3.7";
@ -21,7 +21,7 @@ buildPythonPackage rec {
owner = "esphome";
repo = pname;
rev = "v${version}";
sha256 = "sha256-MuQQ9IpLjsAStpdG8Q0uOzLQl02afStVb52/Rtd+IIs=";
sha256 = "1bkk6mj1h1zhhp4s1ps6g950vzgfbxdj9pw762fz238p48ccw90b";
};
propagatedBuildInputs = [

View file

@ -11,12 +11,12 @@
buildPythonPackage rec {
pname = "azure-mgmt-containerinstance";
version = "8.0.0";
version = "9.0.0";
src = fetchPypi {
inherit pname version;
extension = "zip";
sha256 = "7aeb380af71fc35a71d6752fa25eb5b95fdb2a0027fa32e6f50bce87e2622916";
sha256 = "041431c5a768ac652aac318a17f2a53b90db968494c79abbafec441d0be387ff";
};
propagatedBuildInputs = [
@ -31,6 +31,8 @@ buildPythonPackage rec {
# has no tests
doCheck = false;
pythonImportsCheck = [ "azure.mgmt.containerinstance" ];
meta = with lib; {
description = "This is the Microsoft Azure Container Instance Client Library";
homepage = "https://github.com/Azure/azure-sdk-for-python";

View file

@ -4,6 +4,7 @@
, simpleeval
, isPy27
, coveralls
, wcmatch
}:
buildPythonPackage rec {
@ -21,6 +22,7 @@ buildPythonPackage rec {
propagatedBuildInputs = [
simpleeval
wcmatch
];
checkInputs = [
@ -31,10 +33,14 @@ buildPythonPackage rec {
coverage run -m unittest discover -s tests -t tests
'';
pythonImportsCheck = [
"casbin"
];
meta = with lib; {
description = "An authorization library that supports access control models like ACL, RBAC, ABAC in Python";
homepage = "https://github.com/casbin/pycasbin";
license = licenses.asl20;
maintainers = [ maintainers.costrouc ];
maintainers = with maintainers; [ costrouc ];
};
}

View file

@ -12,11 +12,11 @@
buildPythonPackage rec {
pname = "check-manifest";
version = "0.46";
version = "0.47";
src = fetchPypi {
inherit pname version;
sha256 = "5895e42a012989bdc51854a02c82c8d6898112a4ab11f2d7878200520b49d428";
sha256 = "56dadd260a9c7d550b159796d2894b6d0bcc176a94cbc426d9bb93e5e48d12ce";
};
# Test requires filesystem access

View file

@ -13,13 +13,13 @@
buildPythonPackage rec {
pname = "Django";
version = "3.2.5";
version = "3.2.7";
disabled = pythonOlder "3.7";
src = fetchPypi {
inherit pname version;
sha256 = "1kam3301jl53vm0mhflwwsqy5d7kb5dksmjanlaj7v7xakm5z81x";
sha256 = "95b318319d6997bac3595517101ad9cc83fe5672ac498ba48d1a410f47afecd2";
};
patches = lib.optional withGdal

View file

@ -0,0 +1,64 @@
{ lib
, beautifulsoup4
, buildPythonPackage
, click
, colorama
, fetchFromGitHub
, html2text
, lxml
, pytestCheckHook
, python-dateutil
, pytz
, requests
, simplejson
, tabulate
}:
buildPythonPackage rec {
pname = "faraday-plugins";
version = "1.5.3";
src = fetchFromGitHub {
owner = "infobyte";
repo = "faraday_plugins";
rev = "v${version}";
sha256 = "0nyywpsyw7akwdah75s9mz5nz11y1hbynp08pvqifwdw49crih02";
};
propagatedBuildInputs = [
beautifulsoup4
click
colorama
html2text
lxml
python-dateutil
pytz
requests
simplejson
tabulate
];
checkInputs = [
pytestCheckHook
];
disabledTestPaths = [
# faraday itself is currently not available
"tests/test_report_collection.py"
];
disabledTests = [
# Fail because of missing faraday
"test_detect_report"
"test_process_report_summary"
];
pythonImportsCheck = [ "faraday_plugins" ];
meta = with lib; {
description = "Security tools report parsers for Faraday";
homepage = "https://github.com/infobyte/faraday_plugins";
license = with licenses; [ gpl3Only ];
maintainers = with maintainers; [ fab ];
};
}

View file

@ -0,0 +1,59 @@
{ buildPythonPackage
, cython
, fetchFromGitHub
, isPy38
, lib
, lz4
, numpy
, pandas
, pytestCheckHook
, python-dateutil
, python-snappy
, pythonOlder
, zstandard
}:
buildPythonPackage rec {
pname = "fastavro";
version = "1.4.4";
disabled = pythonOlder "3.6";
src = fetchFromGitHub {
owner = pname;
repo = pname;
rev = version;
sha256 = "1sf8nqifwp0cggk59s22ygj3rm1nysa8b91xl8bpv2knqyjy1q32";
};
preBuild = ''
export FASTAVRO_USE_CYTHON=1
'';
nativeBuildInputs = [ cython ];
checkInputs = [
lz4
numpy
pandas
pytestCheckHook
python-dateutil
python-snappy
zstandard
];
# Fails with "AttributeError: module 'fastavro._read_py' has no attribute
# 'CYTHON_MODULE'." Doesn't appear to be serious. See https://github.com/fastavro/fastavro/issues/112#issuecomment-387638676.
disabledTests = [ "test_cython_python" ];
# CLI tests are broken on Python 3.8. See https://github.com/fastavro/fastavro/issues/558.
disabledTestPaths = lib.optionals isPy38 [ "tests/test_main_cli.py" ];
pythonImportsCheck = [ "fastavro" ];
meta = with lib; {
description = "Fast read/write of AVRO files";
homepage = "https://github.com/fastavro/fastavro";
license = licenses.mit;
maintainers = with maintainers; [ samuela ];
};
}

View file

@ -14,14 +14,14 @@
buildPythonPackage rec {
pname = "influxdb-client";
version = "1.20.0";
version = "1.21.0";
disabled = pythonOlder "3.6";
src = fetchFromGitHub {
owner = "influxdata";
repo = "influxdb-client-python";
rev = "v${version}";
sha256 = "sha256-VBKGzoLn71BQ5drbdiDjbpfHuYKGqHhuSwq0iNwdfh4=";
sha256 = "081pwd3aa7kbgxqcl1hfi2ny4iapnxkcp9ypsfslr69d0khvfc4s";
};
propagatedBuildInputs = [

View file

@ -7,13 +7,13 @@
}:
buildPythonPackage rec {
version = "2.0.3";
version = "2.1.0";
pname = "maxminddb";
disabled = pythonOlder "3.6";
src = fetchPypi {
inherit pname version;
sha256 = "47e86a084dd814fac88c99ea34ba3278a74bc9de5a25f4b815b608798747c7dc";
sha256 = "c47b8acba98d03b8c762684d899623c257976f3eb0c9d557ff865d20cddc9d6b";
};
buildInputs = [ libmaxminddb ];

View file

@ -0,0 +1,43 @@
{ lib
, buildPythonPackage
, fetchFromGitHub
, pytestCheckHook
, coreutils
, pythonOlder
, astunparse
, jq
, bc
}:
buildPythonPackage rec {
pname = "pyp";
version = "0.3.4";
src = fetchFromGitHub {
owner = "hauntsaninja";
repo = pname;
rev = "v${version}";
sha256 = "sha256-K9dGmvy4siurmhqwNfg1dT0TWc6tCSaxfPyaJkYM2Vw=";
};
propagatedBuildInputs = lib.optionals (pythonOlder "3.9") [
astunparse
];
preCheck = ''
export PATH=$out/bin:$PATH
'';
checkInputs = [
pytestCheckHook
coreutils
jq
bc
];
meta = with lib; {
description = "Easily run Python at the shell! Magical, but never mysterious.";
homepage = "https://github.com/hauntsaninja/pyp";
license = licenses.mit;
maintainers = with maintainers; [ rmcgibbo ];
};
}

View file

@ -0,0 +1,26 @@
{ lib
, buildPythonPackage
, fetchPypi
}:
buildPythonPackage rec {
pname = "python-status";
version = "1.0.1";
src = fetchPypi {
inherit pname version;
sha256 = "0lryrvmi04g7d38ilm4wfw717m0ddhylrzb5cm59lrp3ai3q572f";
};
# Project doesn't ship tests yet
doCheck = false;
pythonImportsCheck = [ "status" ];
meta = with lib; {
description = "HTTP Status for Humans";
homepage = "https://github.com/avinassh/status/";
license = with licenses; [ mit ];
maintainers = with maintainers; [ fab ];
};
}

View file

@ -1,6 +1,8 @@
{ lib
, appdirs
, attrs
, buildPythonPackage
, bson
, cattrs
, fetchFromGitHub
, itsdangerous
@ -18,15 +20,16 @@
buildPythonPackage rec {
pname = "requests-cache";
version = "0.7.4";
disabled = pythonOlder "3.6";
version = "0.8.1";
format = "pyproject";
disabled = pythonOlder "3.7";
src = fetchFromGitHub {
owner = "reclosedev";
repo = "requests-cache";
rev = "v${version}";
sha256 = "sha256-FndKFdmEsp3TF2W4b7nhARi9ZOutlE43vvzYxiwbL08=";
sha256 = "sha256-HzOcPWmvUhqPtb/7Mnw6wWY7a4CwGRwPgq+7QoHJAc8=";
};
nativeBuildInputs = [
@ -34,7 +37,9 @@ buildPythonPackage rec {
];
propagatedBuildInputs = [
appdirs
attrs
bson
cattrs
itsdangerous
pyyaml

View file

@ -0,0 +1,57 @@
{ lib
, fetchFromGitHub
, buildPythonPackage
, numpy
, cython
, scipy
, scikit-learn
, matplotlib
, pytestCheckHook
}:
buildPythonPackage rec {
pname = "scikit-learn-extra";
version = "0.2.0";
src = fetchFromGitHub {
owner = "scikit-learn-contrib";
repo = pname;
rev = "v${version}";
sha256 = "09v7a9jdycdrlqq349m1gbn8ppzv1bl5g3l72k6ywsx2xb01qw13";
};
nativeBuildInputs = [ numpy cython ];
propagatedBuildInputs = [ numpy scipy scikit-learn ];
checkInputs = [ matplotlib pytestCheckHook ];
preCheck = ''
# Remove the package in the build dir, because Python defaults to it and
# ignores the one in Nix store with cythonized modules.
rm -r sklearn_extra
'';
pytestFlagsArray = [ "--pyargs sklearn_extra" ];
disabledTestPaths = [
"benchmarks"
"examples"
"doc"
];
disabledTests = [
"build" # needs network connection
];
# Check packages with cythonized modules
pythonImportsCheck = [
"sklearn_extra"
"sklearn_extra.cluster"
"sklearn_extra.robust"
"sklearn_extra.utils"
];
meta = {
description = "A set of tools for scikit-learn";
homepage = "https://github.com/scikit-learn-contrib/scikit-learn-extra";
license = lib.licenses.bsd3;
maintainers = with lib.maintainers; [ yl3dy ];
};
}

View file

@ -0,0 +1,55 @@
{ lib
, asynctest
, buildPythonPackage
, fetchFromGitHub
, httpx
, pytest-asyncio
, pytest-httpserver
, pytestCheckHook
, python-slugify
, python-status
, pythonOlder
}:
buildPythonPackage rec {
pname = "simple-rest-client";
version = "1.0.8";
disabled = pythonOlder "3.6";
src = fetchFromGitHub {
owner = "allisson";
repo = "python-simple-rest-client";
rev = version;
sha256 = "12qxhrjhlbyyr1pkvwfkcxbsmyns5b0mfdn42vz310za5x76ldj3";
};
propagatedBuildInputs = [
httpx
python-slugify
python-status
];
checkInputs = [
asynctest
pytest-asyncio
pytest-httpserver
pytestCheckHook
];
postPatch = ''
substituteInPlace setup.py \
--replace "pytest-runner" ""
substituteInPlace pytest.ini \
--replace " --cov=simple_rest_client --cov-report=term-missing" ""
'';
pythonImportsCheck = [ "simple_rest_client" ];
meta = with lib; {
description = "Simple REST client for Python";
homepage = "https://github.com/allisson/python-simple-rest-client";
license = with licenses; [ mit ];
maintainers = with maintainers; [ fab ];
};
}

View file

@ -4,13 +4,13 @@
buildPythonPackage rec {
pname = "skytemple-files";
version = "1.3.0";
version = "1.3.1";
src = fetchFromGitHub {
owner = "SkyTemple";
repo = pname;
rev = version;
sha256 = "1gpmgdas7x1zmszs9hlxjb6nk683901cy1kc0gyhz0rzdn5jg3lb";
sha256 = "04n2g2lbff0fr3mkqma39j6acpbj73dbizz9hw5m15110idc577h";
fetchSubmodules = true;
};

View file

@ -12,14 +12,14 @@
buildPythonPackage rec {
pname = "smbprotocol";
version = "1.6.2";
version = "1.7.0";
disabled = pythonOlder "3.6";
src = fetchFromGitHub {
owner = "jborean93";
repo = pname;
rev = "v${version}";
sha256 = "sha256-nSWZfhZD++I5hM2ijqft2U95kyEe3h/nrSfiT3sQiKE=";
sha256 = "sha256-4nhgt9/LgoGucNehZkgs4XcneCq+fihWQHtwMbuSp2s=";
};
propagatedBuildInputs = [

View file

@ -5,11 +5,11 @@
buildPythonPackage rec {
pname = "types-requests";
version = "2.25.6";
version = "2.25.8";
src = fetchPypi {
inherit pname version;
sha256 = "1vh203dppi6457lwv7z46dc8rpanjlahk4v3394nq1jwyp0425g2";
sha256 = "sha256-IlrC6GVJtu86ikS/lV+AtJVYVXBKFdKIPYRFyN9jckI=";
};
# Modules doesn't have tests

View file

@ -8,7 +8,7 @@
buildPythonPackage rec {
pname = "velbus-aio";
version = "2021.9.1";
version = "2021.9.2";
disabled = pythonOlder "3.7";
@ -16,7 +16,7 @@ buildPythonPackage rec {
owner = "Cereal2nd";
repo = pname;
rev = version;
sha256 = "0q7jrjljp65lrazv2yjsiw69240vmhcss3dqrgxhq79dpyck6zfl";
sha256 = "sha256-pFVhWrMygCwAsAYPnqtoaPcgh6y0Tf9vROYfn0M+g2E=";
};
propagatedBuildInputs = [

View file

@ -0,0 +1,36 @@
{ lib
, buildPythonPackage
, fetchFromGitHub
, six
, certauth
}:
buildPythonPackage rec {
pname = "wsgiprox";
version = "1.5.2";
src = fetchFromGitHub {
owner = "webrecorder";
repo = "wsgiprox";
# https://github.com/webrecorder/wsgiprox/issues/8
rev = "004870a87959e68ff28ff4362e4f0df28ec22030";
sha256 = "sha256-EquddaNrVceyJHuQMCajKHGZX2Q7ebR0Zhvi2pl2WEw=";
};
propagatedBuildInputs = [
six
certauth
];
pythonImportsCheck = [ "wsgiprox" ];
# See https://github.com/webrecorder/wsgiprox/issues/6
doCheck = false;
meta = with lib; {
description = "Python WSGI Middleware for adding HTTP/S proxy support to any WSGI Application";
homepage = "https://github.com/webrecorder/wsgiprox";
license = licenses.asl20;
maintainers = with maintainers; [ Luflosi ];
};
}

View file

@ -1,27 +1,36 @@
{ fetchurl, lib, stdenv, pkg-config, libxml2, llvm, perl }:
{ callPackage, fetchurl, lib, stdenv, gtk3, pkg-config, libxml2, llvm, perl, sqlite }:
stdenv.mkDerivation rec {
let
GCC_BASE = "${stdenv.cc.cc}/lib/gcc/${stdenv.hostPlatform.uname.processor}-unknown-linux-gnu/${stdenv.cc.cc.version}";
in stdenv.mkDerivation rec {
pname = "sparse";
version = "0.5.0";
version = "0.6.3";
src = fetchurl {
url = "mirror://kernel/software/devel/sparse/dist/${pname}-${version}.tar.xz";
sha256 = "1mc86jc5xdrdmv17nqj2cam2yqygnj6ar1iqkwsx2y37ij8wy7wj";
sha256 = "16d8c4dhipjzjf8z4z7pix1pdpqydz0v4r7i345f5s09hjnxpxnl";
};
preConfigure = ''
sed -i Makefile -e "s|^PREFIX=.*$|PREFIX=$out|g"
sed -i 's|"/usr/include"|"${stdenv.cc.libc.dev}/include"|' pre-process.c
sed -i 's|qx(\$ccom -print-file-name=)|"${GCC_BASE}"|' cgcc
makeFlags+=" PREFIX=$out"
'';
nativeBuildInputs = [ pkg-config ];
buildInputs = [ libxml2 llvm perl ];
buildInputs = [ gtk3 libxml2 llvm perl sqlite ];
doCheck = true;
buildFlags = "GCC_BASE:=${GCC_BASE}";
meta = {
passthru.tests = {
simple-execution = callPackage ./tests.nix { };
};
meta = with lib; {
description = "Semantic parser for C";
homepage = "https://git.kernel.org/cgit/devel/sparse/sparse.git/";
license = lib.licenses.mit;
platforms = lib.platforms.linux;
maintainers = [ lib.maintainers.thoughtpolice ];
license = licenses.mit;
platforms = platforms.linux;
maintainers = with maintainers; [ thoughtpolice jkarlson ];
};
}

View file

@ -0,0 +1,24 @@
{ runCommand, gcc, sparse, writeText }:
let
src = writeText "CODE.c" ''
#include <stdio.h>
#include <stddef.h>
#include <stdlib.h>
int main(int argc, char *argv[]) {
return EXIT_SUCCESS;
}
'';
in
runCommand "${sparse.pname}-tests" { buildInputs = [ gcc sparse ]; meta.timeout = 3; }
''
set -eu
${sparse}/bin/cgcc ${src} > output 2>&1 || ret=$?
if [[ -z $(<output) ]]; then
mv output $out
else
echo "Test build returned $ret"
cat output
exit 1
fi
''

View file

@ -1,16 +1,16 @@
{ lib, buildGoPackage, fetchFromGitLab, fetchurl }:
let
version = "14.2.0";
version = "14.3.0";
# Gitlab runner embeds some docker images these are prebuilt for arm and x86_64
docker_x86_64 = fetchurl {
url = "https://gitlab-runner-downloads.s3.amazonaws.com/v${version}/binaries/gitlab-runner-helper/gitlab-runner-helper.x86_64";
sha256 = "1a5prg5yxs29zv8321cfqn1j638yihj7z7pniyd5aycgz5zra8lb";
sha256 = "0r6pfw8hz7blzqcg92dr6iklry155mmp4z7f45a1j1w3nddaklfn";
};
docker_arm = fetchurl {
url = "https://gitlab-runner-downloads.s3.amazonaws.com/v${version}/binaries/gitlab-runner-helper/gitlab-runner-helper.arm";
sha256 = "0knw2r1lxri922283653vq9wkp1w85p0avhyajrik7c1wvi0flx6";
sha256 = "0y1dz2ffkcizwkm6lcdll7i1y4h3q6ayl6c0370ayzi6yw788cb8";
};
in
buildGoPackage rec {
@ -29,7 +29,7 @@ buildGoPackage rec {
owner = "gitlab-org";
repo = "gitlab-runner";
rev = "v${version}";
sha256 = "0b444nf9ipslcqim54y4m4flfy3dg38vcvcbzic1p76hph8p7s93";
sha256 = "092yy7371iypyq72vl4zdjp0w4a2ys6xm3cxxcxih8sc7sh8kxn6";
};
patches = [ ./fix-shell-path.patch ];

View file

@ -2,13 +2,13 @@
buildGoModule rec {
pname = "efm-langserver";
version = "0.0.36";
version = "0.0.37";
src = fetchFromGitHub {
owner = "mattn";
repo = "efm-langserver";
rev = "v${version}";
sha256 = "sha256-X2z49KmJiKh1QtcDBZcqNiMhq5deVamS47w6gyVq7Oo=";
sha256 = "sha256-7weRR1+n0v2HHkM4iYAzWDazmPJUmJj5TQo+dG13B0M=";
};
vendorSha256 = "sha256-tca+1SRrFyvU8ttHmfMFiGXd1A8rQSEWm1Mc2qp0EfI=";

View file

@ -1,22 +1,9 @@
{ lib, stdenv, fetchFromGitHub, srcOnly, nim }:
let
astpatternmatching = fetchFromGitHub {
owner = "krux02";
repo = "ast-pattern-matching";
rev = "87f7d163421af5a4f5e5cb6da7b93278e6897e96";
sha256 = "19mb5bb6riia8380p5dpc3q0vwgrj958dd6p7vw8vkvwiqrzg6zq";
};
{ lib, nimPackages, fetchFromGitHub, srcOnly, nim }:
jsonschema = fetchFromGitHub {
owner = "PMunch";
repo = "jsonschema";
rev = "7b41c03e3e1a487d5a8f6b940ca8e764dc2cbabf";
sha256 = "1js64jqd854yjladxvnylij4rsz7212k31ks541pqrdzm6hpblbz";
};
in
stdenv.mkDerivation rec {
nimPackages.buildNimPackage rec {
pname = "nimlsp";
version = "0.3.2";
nimBinOnly = true;
src = fetchFromGitHub {
owner = "PMunch";
@ -25,18 +12,15 @@ stdenv.mkDerivation rec {
sha256 = "1lm823nvpp3bj9527jd8n1jxh6y8p8ngkfkj91p94m7ffai6jazq";
};
nativeBuildInputs = [ nim ];
buildInputs = with nimPackages; [ astpatternmatching jsonschema ];
buildPhase = ''
export HOME=$TMPDIR
nim -d:release -p:${astpatternmatching}/src -p:${jsonschema}/src \
c --threads:on -d:nimcore -d:nimsuggest -d:debugCommunication \
-d:debugLogging -d:explicitSourcePath=${srcOnly nim.passthru.nim} -d:tempDir=/tmp src/nimlsp
'';
nimFlags = [
"--threads:on"
"-d:explicitSourcePath=${srcOnly nimPackages.nim.passthru.nim}"
"-d:tempDir=/tmp"
];
installPhase = ''
install -Dt $out/bin src/nimlsp
'';
nimDefines = [ "nimcore" "nimsuggest" "debugCommunication" "debugLogging" ];
meta = with lib; {
description = "Language Server Protocol implementation for Nim";

View file

@ -1,8 +1,9 @@
{ stdenv, lib, fetchFromGitHub, fetchpatch, makeWrapper, nim, pcre, tinycc }:
{ lib, nimPackages, fetchFromGitHub, fetchpatch, makeWrapper, pcre, tinycc }:
stdenv.mkDerivation {
nimPackages.buildNimPackage {
pname = "nrpl";
version = "20150522";
nimBinOnly = true;
src = fetchFromGitHub {
owner = "wheineman";
@ -12,7 +13,7 @@ stdenv.mkDerivation {
};
nativeBuildInputs = [ makeWrapper ];
buildInputs = [ nim pcre ];
buildInputs = [ pcre ];
patches = [
(fetchpatch {
@ -24,16 +25,9 @@ stdenv.mkDerivation {
NIX_LDFLAGS = "-lpcre";
buildPhase = ''
HOME=$TMPDIR
nim c -d:release nrpl.nim
'';
installPhase = "install -Dt $out/bin nrpl";
postFixup = ''
wrapProgram $out/bin/nrpl \
--prefix PATH : ${lib.makeBinPath [ nim tinycc ]}
--prefix PATH : ${lib.makeBinPath [ nimPackages.nim tinycc ]}
'';
meta = with lib; {

View file

@ -0,0 +1,28 @@
{ lib, rustPlatform, fetchFromGitHub }:
rustPlatform.buildRustPackage rec {
pname = "rust-code-analysis";
version = "0.0.23";
src = fetchFromGitHub {
owner = "mozilla";
repo = pname;
rev = "v${version}";
sha256 = "1l9qr5rvbj542fx6g6h9p38z31kvwli39vipbmd3pvic2mpi6mzx";
};
cargoSha256 = "sha256-++d/czDJVGzY8GvBpBKpP0Rum4J4RpT95S81IRUWY2M=";
cargoBuildFlags = [ "--workspace" ];
meta = with lib; {
description = "Analyze and collect metrics on source code";
homepage = "https://github.com/mozilla/rust-code-analysis";
license = with licenses; [
mit # grammars
mpl20 # code
];
maintainers = with maintainers; [ figsoda ];
mainProgram = "rust-code-analysis-cli";
};
}

View file

@ -2,16 +2,16 @@
rustPlatform.buildRustPackage rec {
pname = "cargo-watch";
version = "8.1.0";
version = "8.1.1";
src = fetchFromGitHub {
owner = "passcod";
repo = pname;
rev = "v${version}";
sha256 = "sha256-Vvr/O0Xk9hmUVUFoOk/MzTlEvR0Spx5n/9lsE2HfkF8=";
sha256 = "sha256-wv1aD20VHar0V7oKOEKIX3klGVXauMXU4vL+NgNeZPk=";
};
cargoSha256 = "sha256-kX9CE95Z2nLb6VM19bu+UkOZ/hsjHUo/JMu0Y0xont0=";
cargoSha256 = "sha256-qhCDrZAG1FcPYKMj2C/m+5Dplko4Tpp1hGpRdGOK/Ds=";
buildInputs = lib.optionals stdenv.isDarwin [ CoreServices Foundation libiconv ];

View file

@ -1,34 +1,59 @@
{ lib, fetchurl, stdenv, cmake, boost, ogre, mygui, ois, SDL2, libvorbis, pkg-config
, makeWrapper, enet, libXcursor, bullet, openal }:
{ lib
, fetchFromGitHub
, stdenv
, cmake
, boost
, ogre
, mygui
, ois
, SDL2
, libvorbis
, pkg-config
, makeWrapper
, enet
, libXcursor
, bullet
, openal
}:
stdenv.mkDerivation rec {
pname = "stunt-rally";
version = "2.6.1";
src = fetchurl {
url = "https://github.com/stuntrally/stuntrally/archive/${version}.tar.gz";
sha256 = "1zxq3x2g9pzafa2awx9jzqd33z6gnqj231cs07paxzrm89y51w4v";
src = fetchFromGitHub {
owner = "stuntrally";
repo = "stuntrally";
rev = version;
hash = "sha256-1+Cc9I6TTa3b++/7Z2V+vAXcmFb2+wX7TnXEH6CRDWU=";
};
tracks = fetchurl {
url = "https://github.com/stuntrally/tracks/archive/${version}.tar.gz";
sha256 = "0x6lgpa4c2grl0vrhqrcs7jcysa3mmvpdl1v5xa0dsf6vkvfr0zs";
tracks = fetchFromGitHub {
owner = "stuntrally";
repo = "tracks";
rev = version;
hash = "sha256-FbZc87j/9cp4LxNaEO2wNTvwk1Aq/IWcKD3rTGkzqj0=";
};
# include/OGRE/OgreException.h:265:126: error: invalid conversion from
# 'int' to 'Ogre::Exception::ExceptionCodes' [-fpermissive]
NIX_CFLAGS_COMPILE="-fpermissive";
NIX_CFLAGS_COMPILE = "-fpermissive";
preConfigure = ''
pushd data
tar xf ${tracks}
mv tracks-${version} tracks
popd
ln -s ${tracks} data/tracks
'';
nativeBuildInputs = [ cmake pkg-config ];
buildInputs = [ boost ogre mygui ois SDL2 libvorbis
makeWrapper enet libXcursor bullet openal
buildInputs = [
boost
ogre
mygui
ois
SDL2
libvorbis
makeWrapper
enet
libXcursor
bullet
openal
];
meta = with lib; {

View file

@ -1,4 +1,4 @@
{ stdenv, lib, requireFile, writeText, fetchurl, haskellPackages }:
{ stdenv, lib, requireFile, writeText, fetchFromGitHub, haskellPackages }:
let
makeSpin = num: let
@ -13,13 +13,15 @@ let
slides.intro = 3DOVID:addons/3dovideo/intro/intro.duk
'' + lib.concatMapStrings makeSpin (lib.range 0 24));
helper = with haskellPackages; mkDerivation {
helper = with haskellPackages; mkDerivation rec {
pname = "uqm3donix";
version = "0.1.0.0";
src = fetchurl {
url = "https://github.com/aszlig/uqm3donix/archive/v0.1.0.0.tar.gz";
sha256 = "0d40gpc3bqkw68varjxwgbdzxw0dvwqksijmvij5ixmlcspbjgvb";
src = fetchFromGitHub {
owner = "aszlig";
repo = "uqm3donix";
rev = "v${version}";
hash = "sha256-rK30u2PBysiSGSA9829F1Nom/wtoVN6rGTBneRKeWEw=";
};
isLibrary = false;

View file

@ -1,4 +1,4 @@
{ stdenv, lib, fetchurl, pkg-config, libGLU, libGL
{ stdenv, lib, fetchurl, fetchFromGitHub, pkg-config, libGLU, libGL
, SDL, SDL_image, libpng, libvorbis, libogg, libmikmod
, use3DOVideos ? false, requireFile ? null, writeText ? null
@ -12,7 +12,7 @@ assert use3DOVideos -> requireFile != null && writeText != null
let
videos = import ./3dovideo.nix {
inherit stdenv lib requireFile writeText fetchurl haskellPackages;
inherit stdenv lib requireFile writeText fetchFromGitHub haskellPackages;
};
remixPacks = lib.imap1 (num: sha256: fetchurl rec {

View file

@ -1,7 +1,7 @@
{ lib, stdenv, fetchurl, pkg-config, cups, poppler, poppler_utils, fontconfig
, libjpeg, libpng, perl, ijs, qpdf, dbus, avahi
, makeWrapper, coreutils, gnused, bc, gawk, gnugrep, which, ghostscript
, mupdf
, mupdf, dejavu_fonts, liblouis
}:
let
@ -9,11 +9,11 @@ let
in stdenv.mkDerivation rec {
pname = "cups-filters";
version = "1.25.12";
version = "1.28.10";
src = fetchurl {
url = "https://openprinting.org/download/cups-filters/${pname}-${version}.tar.xz";
sha256 = "1kv25011iyzvd33n5zmmn1z2p6pzk26hmmw6qvjjnx8p3sp7raqn";
sha256 = "sha256-z4yQRpTETPaJtXJORtI9qa5RJdVDdLNAxkIHfMKcqDc=";
};
nativeBuildInputs = [ pkg-config makeWrapper ];
@ -21,6 +21,7 @@ in stdenv.mkDerivation rec {
buildInputs = [
cups poppler poppler_utils fontconfig libjpeg libpng perl
ijs qpdf dbus avahi ghostscript mupdf
liblouis # braille embosser support
];
configureFlags = [
@ -33,7 +34,7 @@ in stdenv.mkDerivation rec {
"--enable-imagefilters"
"--with-rcdir=no"
"--with-shell=${stdenv.shell}"
"--with-test-font-path=/path-does-not-exist"
"--with-test-font-path=${dejavu_fonts}/share/fonts/truetype/DejaVuSans.ttf"
];
makeFlags = [ "CUPS_SERVERBIN=$(out)/lib/cups" "CUPS_DATADIR=$(out)/share/cups" "CUPS_SERVERROOT=$(out)/etc/cups" ];
@ -60,7 +61,7 @@ in stdenv.mkDerivation rec {
'';
enableParallelBuilding = true;
doCheck = false; # fails 4 out of 6 tests
doCheck = true;
meta = {
homepage = "http://www.linuxfoundation.org/collaborate/workgroups/openprinting/cups-filters";

View file

@ -40,7 +40,7 @@ let
(whenOlder "5.2" (if (features.debug or false) then yes else no))
(whenAtLeast "5.2" yes)
];
DEBUG_INFO_BTF = whenAtLeast "5.2" yes;
DEBUG_INFO_BTF = whenAtLeast "5.2" (option yes);
DEBUG_KERNEL = yes;
DEBUG_DEVRES = no;
DYNAMIC_DEBUG = yes;

View file

@ -1,12 +1,14 @@
{ lib, stdenv, fetchurl, installShellFiles, nixosTests }:
{ lib, stdenv, fetchFromGitHub, installShellFiles, nixosTests }:
stdenv.mkDerivation rec {
version = "1.12";
pname = "beanstalkd";
src = fetchurl {
url = "https://github.com/kr/beanstalkd/archive/v${version}.tar.gz";
sha256 = "0gw8aygysnjzzfjgfzivy5vajla9adg2zcr4h8rrdf0xyykpwfpl";
src = fetchFromGitHub {
owner = "kr";
repo = "beanstalkd";
rev = "v${version}";
hash = "sha256-HChpVZ02l08CObrb4+ZEjBiXeQMMYi6zhSWUTDxuEao=";
};
hardeningDisable = [ "fortify" ];

View file

@ -1,4 +1,4 @@
{ fetchurl, python2Packages, lib }:
{ fetchFromGitHub, python2Packages, lib }:
with python2Packages;
@ -7,9 +7,11 @@ buildPythonApplication rec {
version = "3.0.1";
disabled = isPy3k;
src = fetchurl {
url = "https://github.com/CouchPotato/CouchPotatoServer/archive/build/${version}.tar.gz";
sha256 = "1xwjis3ijh1rff32mpdsphmsclf0lkpd3phpgxkccrigq1m9r3zh";
src = fetchFromGitHub {
owner = "CouchPotato";
repo = "CouchPotatoServer";
rev = "build/${version}";
hash = "sha256-0k8MqLnqYjhHPE9/jncTFIj1T4F2aXU4mXdeEimDB7M=";
};
format = "other";

View file

@ -1,12 +1,14 @@
{ lib, stdenv, fetchurl, systemd, fcgi, autoreconfHook, pkg-config }:
{ lib, stdenv, fetchFromGitHub, systemd, fcgi, autoreconfHook, pkg-config }:
stdenv.mkDerivation rec {
pname = "fcgiwrap";
version = "1.1.0";
src = fetchurl {
url = "https://github.com/gnosek/fcgiwrap/archive/${version}.tar.gz";
sha256 = "07y6s4mm86cv7p1ljz94sxnqa89y9amn3vzwsnbq5hrl4vdy0zac";
src = fetchFromGitHub {
owner = "gnosek";
repo = "fcgiwrap";
rev = version;
hash = "sha256-znAsZk+aB2XO2NK8Mjc+DLwykYKHolnVQPErlaAx3Oc=";
};
NIX_CFLAGS_COMPILE = "-Wno-error=implicit-fallthrough";

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