diff options
author | Frederik Rietdijk <fridh@fridh.nl> | 2020-04-22 17:20:20 +0200 |
---|---|---|
committer | Frederik Rietdijk <fridh@fridh.nl> | 2020-04-22 17:20:20 +0200 |
commit | 8374a2a0eee41361d4af9d32460e4956dcbea61c (patch) | |
tree | 0a4788ab72ad7968aad65dd0668147d065ea9951 /pkgs/development | |
parent | 23be4a8b4de7790f48998d245a3ff5fe549e0f2b (diff) | |
parent | 95f82e2a45266cdca661389705da7c672c7a9cbc (diff) | |
download | nixlib-8374a2a0eee41361d4af9d32460e4956dcbea61c.tar nixlib-8374a2a0eee41361d4af9d32460e4956dcbea61c.tar.gz nixlib-8374a2a0eee41361d4af9d32460e4956dcbea61c.tar.bz2 nixlib-8374a2a0eee41361d4af9d32460e4956dcbea61c.tar.lz nixlib-8374a2a0eee41361d4af9d32460e4956dcbea61c.tar.xz nixlib-8374a2a0eee41361d4af9d32460e4956dcbea61c.tar.zst nixlib-8374a2a0eee41361d4af9d32460e4956dcbea61c.zip |
Merge master into staging-next
Diffstat (limited to 'pkgs/development')
37 files changed, 945 insertions, 351 deletions
diff --git a/pkgs/development/compilers/crystal/build-package.nix b/pkgs/development/compilers/crystal/build-package.nix index 8ffa89a11b4a..856c6e58bc18 100644 --- a/pkgs/development/compilers/crystal/build-package.nix +++ b/pkgs/development/compilers/crystal/build-package.nix @@ -1,53 +1,109 @@ -{ stdenv, lib, crystal, linkFarm, fetchFromGitHub }: -{ # Generate shards.nix with `nix-shell -p crystal2nix --run crystal2nix` in the projects root - shardsFile ? null +{ stdenv, lib, crystal, shards, git, pkgconfig, which, linkFarm, fetchFromGitHub, installShellFiles }: + +{ # Some projects do not include a lock file, so you can pass one + lockFile ? null + # Generate shards.nix with `nix-shell -p crystal2nix --run crystal2nix` in the projects root +, shardsFile ? null + # We support different builders. To make things more straight forward, make it + # user selectable instead of trying to autodetect +, format ? "make" +, installManPages ? true # Specify binaries to build in the form { foo.src = "src/foo.cr"; } # The default `crystal build` options can be overridden with { foo.options = [ "--no-debug" ]; } -, crystalBinaries ? {} -, ... -}@args: +, crystalBinaries ? { }, ... }@args: + +assert (builtins.elem format [ "make" "crystal" "shards" ]); + let - mkDerivationArgs = builtins.removeAttrs args [ "shardsFile" "crystalBinaries" ]; + mkDerivationArgs = builtins.removeAttrs args [ + "format" + "installManPages" + "lockFile" + "shardsFile" + "crystalBinaries" + ]; crystalLib = linkFarm "crystal-lib" (lib.mapAttrsToList (name: value: { inherit name; path = fetchFromGitHub value; }) (import shardsFile)); - defaultOptions = [ "--release" "--progress" "--no-debug" "--verbose" ]; + # we previously had --no-debug here but that is not recommended by upstream + defaultOptions = [ "--release" "--progress" "--verbose" ]; + buildDirectly = shardsFile == null || crystalBinaries != { }; in stdenv.mkDerivation (mkDerivationArgs // { - configurePhase = args.configurePhase or '' - runHook preConfigure - ${lib.optionalString (shardsFile != null) "ln -s ${crystalLib} lib"} - runHook postConfigure - ''; + configurePhase = args.configurePhase or lib.concatStringsSep "\n" ([ + "runHook preConfigure" + ] ++ lib.optional (lockFile != null) "ln -s ${lockFile} ./shard.lock" + ++ lib.optional (shardsFile != null) "ln -s ${crystalLib} lib" + ++ [ "runHook postConfigure "]); - buildInputs = args.buildInputs or [] ++ [ crystal ]; - - buildPhase = args.buildPhase or '' - runHook preBuild - ${lib.concatStringsSep "\n" (lib.mapAttrsToList (bin: attrs: '' - crystal ${lib.escapeShellArgs ([ - "build" - "-o" bin - (attrs.src or (throw "No source file for crystal binary ${bin} provided")) - ] ++ attrs.options or defaultOptions)} - '') crystalBinaries)} - runHook postBuild - ''; + CRFLAGS = lib.concatStringsSep " " defaultOptions; + + PREFIX = placeholder "out"; + + buildInputs = args.buildInputs or [ ] ++ [ crystal ] + ++ lib.optional (format != "crystal") shards; + + nativeBuildInputs = args.nativeBuildInputs or [ ] ++ [ git installShellFiles pkgconfig which ]; + + buildPhase = args.buildPhase or (lib.concatStringsSep "\n" ([ + "runHook preBuild" + ] ++ lib.optional (format == "make") + ''make ''${buildTargets:-build} $makeFlags'' + ++ lib.optionals (format == "crystal") (lib.mapAttrsToList (bin: attrs: '' + crystal ${lib.escapeShellArgs (["build" "-o" bin + (attrs.src or (throw "No source file for crystal binary ${bin} provided")) + ] ++ (attrs.options or defaultOptions))} + '') crystalBinaries) + ++ lib.optional (format == "shards") + "shards build --local --production ${lib.concatStringsSep " " defaultOptions}" + ++ [ "runHook postBuild" ])); + + installPhase = args.installPhase or (lib.concatStringsSep "\n" ([ + "runHook preInstall" + ] ++ lib.optional (format == "make") + ''make ''${installTargets:-install} $installFlags'' + ++ lib.optionals (format == "crystal") (map (bin: '' + install -Dm555 ${lib.escapeShellArgs [ bin "${placeholder "out"}/bin/${bin}" ]} + '') (lib.attrNames crystalBinaries)) + ++ lib.optional (format == "shards") + ''install -Dm555 bin/* -t $out/bin'' + ++ [ + '' + for f in README* *.md LICENSE; do + test -f $f && install -Dm444 $f -t $out/share/doc/${args.pname} + done + '' + ] ++ (lib.optional installManPages '' + if [ -d man ]; then + installManPage man/*.? + fi + '') ++ [ + "runHook postInstall" + ])); + + doCheck = args.doCheck or true; + + checkPhase = args.checkPhase or (lib.concatStringsSep "\n" ([ + "runHook preCheck" + ] ++ lib.optional (format == "make") + ''make ''${checkTarget:-test} $checkFlags'' + ++ lib.optional (format != "make") + ''crystal ''${checkTarget:-spec} $checkFlags'' + ++ [ "runHook postCheck" ])); + + doInstallCheck = args.doInstallCheck or true; - installPhase = args.installPhase or '' - runHook preInstall - mkdir -p "$out/bin" - ${lib.concatMapStringsSep "\n" (bin: '' - mv ${lib.escapeShellArgs [ bin "${placeholder "out"}/bin/${bin}" ]} - '') (lib.attrNames crystalBinaries)} - runHook postInstall + installCheckPhase = args.installCheckPhase or '' + for f in $out/bin/*; do + $f --help + done ''; - meta = args.meta or {} // { + meta = args.meta or { } // { platforms = args.meta.platforms or crystal.meta.platforms; }; }) diff --git a/pkgs/development/compilers/crystal/crystal2nix.nix b/pkgs/development/compilers/crystal/crystal2nix.nix index ac69b9b3d965..5fc40cd23741 100644 --- a/pkgs/development/compilers/crystal/crystal2nix.nix +++ b/pkgs/development/compilers/crystal/crystal2nix.nix @@ -1,4 +1,5 @@ { lib, crystal, nix-prefetch-git }: + crystal.buildCrystalPackage { pname = "crystal2nix"; version = "unstable-2018-07-31"; @@ -6,11 +7,16 @@ crystal.buildCrystalPackage { nixPrefetchGit = "${lib.getBin nix-prefetch-git}/bin/nix-prefetch-git"; unpackPhase = "substituteAll ${./crystal2nix.cr} crystal2nix.cr"; + format = "crystal"; + crystalBinaries.crystal2nix.src = "crystal2nix.cr"; + # it will blow up without a shard.yml file + doInstallCheck = false; + meta = with lib; { description = "Utility to convert Crystal's shard.lock files to a Nix file"; license = licenses.mit; - maintainers = [ maintainers.manveru ]; + maintainers = with maintainers; [ manveru ]; }; } diff --git a/pkgs/development/compilers/ldc/binary.nix b/pkgs/development/compilers/ldc/binary.nix deleted file mode 100644 index 56d40be86194..000000000000 --- a/pkgs/development/compilers/ldc/binary.nix +++ /dev/null @@ -1,41 +0,0 @@ -{ stdenv, fetchurl, curl, tzdata, autoPatchelfHook, fixDarwinDylibNames, libxml2 -, version, hashes }: -with stdenv; -let - OS = if hostPlatform.isDarwin then "osx" else hostPlatform.parsed.kernel.name; - ARCH = toString hostPlatform.parsed.cpu.name; -in mkDerivation { - pname = "ldc-bootstrap"; - inherit version; - - src = fetchurl rec { - name = "ldc2-${version}-${OS}-${ARCH}.tar.xz"; - url = "https://github.com/ldc-developers/ldc/releases/download/v${version}/${name}"; - sha256 = hashes."${OS}-${ARCH}" or (throw "missing bootstrap sha256 for ${OS}-${ARCH}"); - }; - - dontConfigure = true; - dontBuild = true; - - nativeBuildInputs = [ fixDarwinDylibNames autoPatchelfHook ]; - - buildInputs = lib.optionals stdenv.hostPlatform.isLinux [ libxml2 stdenv.cc.cc ]; - - propagatedBuildInputs = [ curl tzdata ]; - - installPhase = '' - mkdir -p $out - - mv bin etc import lib LICENSE README $out/ - ''; - - meta = with lib; { - inherit version; - description = "The LLVM-based D Compiler"; - homepage = "https://github.com/ldc-developers/ldc"; - # from https://github.com/ldc-developers/ldc/blob/master/LICENSE - license = with licenses; [ bsd3 boost mit ncsa gpl2Plus ]; - maintainers = with maintainers; [ ThomasMader lionello ]; - platforms = [ "x86_64-linux" "x86_64-darwin" "aarch64-linux" ]; - }; -} diff --git a/pkgs/development/compilers/ldc/bootstrap.nix b/pkgs/development/compilers/ldc/bootstrap.nix deleted file mode 100644 index fde4c8426848..000000000000 --- a/pkgs/development/compilers/ldc/bootstrap.nix +++ /dev/null @@ -1,10 +0,0 @@ -{ callPackage }: -callPackage ./binary.nix { - version = "1.19.0"; - hashes = { - # Get these from `nix-prefetch-url https://github.com/ldc-developers/ldc/releases/download/v1.19.0/ldc2-1.19.0-osx-x86_64.tar.xz` etc.. - osx-x86_64 = "1bp3xkh9zp64dzq8isanib1gacb3nfbl70qv15qygwk1zan6zgy7"; - linux-x86_64 = "146grr2lwarfk13wgkpyb77xb6b3as1is2rf4s2hipqjmc8biy1h"; - linux-aarch64 = "1fv6jshfvi15m7masgxq1hgp216qjd5amizrqdf26vhrq3a08li3"; - }; -} diff --git a/pkgs/development/compilers/ldc/default.nix b/pkgs/development/compilers/ldc/default.nix index 5a4baabcf8d8..19fe2981c833 100644 --- a/pkgs/development/compilers/ldc/default.nix +++ b/pkgs/development/compilers/ldc/default.nix @@ -1,5 +1,173 @@ -import ./generic.nix { - version = "1.20.1"; - ldcSha256 = "1bqsgab22v02pc3c9gcyf15y7aimadv24d68icaw5lpgnvzxy89b"; +{ stdenv, fetchurl, cmake, ninja, llvm_5, llvm_8, curl, tzdata +, libconfig, lit, gdb, unzip, darwin, bash +, callPackage, makeWrapper, runCommand, targetPackages +, bootstrapVersion ? false +, version ? "1.17.0" +, ldcSha256 ? "1aag5jfrng6p4ms0fs90hjbv9bcj3hj8h52r68c3cm6racdajbva" +}: + +let + bootstrapLdc = if !bootstrapVersion then + # LDC 0.17.x is the last version which doesn't need a working D compiler to + # build so we use that version to bootstrap the actual build. + callPackage ./default.nix { + bootstrapVersion = true; + version = "0.17.6"; + ldcSha256 = "0qf5kbxddgmg3kqzi0kf4bgv8vdrnv16y07hcpm0cwv9mc3qr2w6"; + } + else + ""; + + pathConfig = runCommand "ldc-lib-paths" {} '' + mkdir $out + echo ${tzdata}/share/zoneinfo/ > $out/TZDatabaseDirFile + echo ${curl.out}/lib/libcurl${stdenv.hostPlatform.extensions.sharedLibrary} > $out/LibcurlPathFile + ''; +in + +stdenv.mkDerivation rec { + pname = "ldc"; + inherit version; + + enableParallelBuilding = true; + + src = fetchurl { + url = "https://github.com/ldc-developers/ldc/releases/download/v${version}/ldc-${version}-src.tar.gz"; + sha256 = ldcSha256; + }; + + # https://issues.dlang.org/show_bug.cgi?id=19553 + hardeningDisable = [ "fortify" ]; + + postUnpack = '' + patchShebangs . + '' + + + stdenv.lib.optionalString (!bootstrapVersion) '' + rm ldc-${version}-src/tests/d2/dmd-testsuite/fail_compilation/mixin_gc.d + rm ldc-${version}-src/tests/d2/dmd-testsuite/runnable/xtest46_gc.d + rm ldc-${version}-src/tests/d2/dmd-testsuite/runnable/testptrref_gc.d + + # test depends on current year + rm ldc-${version}-src/tests/d2/dmd-testsuite/compilable/ddocYear.d + '' + + + stdenv.lib.optionalString (!bootstrapVersion && stdenv.hostPlatform.isDarwin) '' + # https://github.com/NixOS/nixpkgs/issues/34817 + rm -r ldc-${version}-src/tests/plugins/addFuncEntryCall + ''; + + postPatch = '' + # Setting SHELL=$SHELL when dmd testsuite is run doesn't work on Linux somehow + substituteInPlace tests/d2/dmd-testsuite/Makefile --replace "SHELL=/bin/bash" "SHELL=${bash}/bin/bash" + '' + + + stdenv.lib.optionalString (!bootstrapVersion && stdenv.hostPlatform.isLinux) '' + substituteInPlace runtime/phobos/std/socket.d --replace "assert(ih.addrList[0] == 0x7F_00_00_01);" "" + '' + + + stdenv.lib.optionalString (!bootstrapVersion && stdenv.hostPlatform.isDarwin) '' + substituteInPlace runtime/phobos/std/socket.d --replace "foreach (name; names)" "names = []; foreach (name; names)" + '' + + + stdenv.lib.optionalString (bootstrapVersion && stdenv.hostPlatform.isDarwin) '' + # Was not able to compile on darwin due to "__inline_isnanl" + # being undefined. + # TODO Remove with version > 0.17.6 + substituteInPlace dmd2/root/port.c --replace __inline_isnanl __inline_isnan + ''; + + nativeBuildInputs = [ cmake ninja makeWrapper unzip ] + ++ stdenv.lib.optionals (!bootstrapVersion) [ + bootstrapLdc lit lit.python + ] + ++ stdenv.lib.optional (!bootstrapVersion && stdenv.hostPlatform.isDarwin) + # https://github.com/NixOS/nixpkgs/issues/57120 + # https://github.com/NixOS/nixpkgs/pull/59197#issuecomment-481972515 + llvm_5 + ++ stdenv.lib.optional (!bootstrapVersion && !stdenv.hostPlatform.isDarwin) + llvm_8 + ++ stdenv.lib.optional (!bootstrapVersion && !stdenv.hostPlatform.isDarwin) + # https://github.com/NixOS/nixpkgs/pull/36378#issuecomment-385034818 + gdb + ++ stdenv.lib.optionals (bootstrapVersion) [ + libconfig llvm_5 + ] + ++ stdenv.lib.optional stdenv.hostPlatform.isDarwin + darwin.apple_sdk.frameworks.Foundation; + + + buildInputs = [ curl tzdata ]; + + cmakeFlags = stdenv.lib.optionals (!bootstrapVersion) [ + "-DD_FLAGS=-d-version=TZDatabaseDir;-d-version=LibcurlPath;-J${pathConfig}" + "-DCMAKE_BUILD_TYPE=Release" + ]; + + postConfigure = '' + export DMD=$PWD/bin/ldmd2 + ''; + + makeFlags = [ "DMD=$DMD" ]; + + fixNames = stdenv.lib.optionalString stdenv.hostPlatform.isDarwin '' + fixDarwinDylibNames() { + local flags=() + + for fn in "$@"; do + flags+=(-change "$(basename "$fn")" "$fn") + done + + for fn in "$@"; do + if [ -L "$fn" ]; then continue; fi + echo "$fn: fixing dylib" + install_name_tool -id "$fn" "''${flags[@]}" "$fn" + done + } + + fixDarwinDylibNames $(find "$(pwd)/lib" -name "*.dylib") + export DYLD_LIBRARY_PATH=$(pwd)/lib + ''; + + # https://github.com/ldc-developers/ldc/issues/2497#issuecomment-459633746 + additionalExceptions = stdenv.lib.optionalString stdenv.hostPlatform.isDarwin + "|druntime-test-shared"; + + doCheck = !bootstrapVersion; + + checkPhase = stdenv.lib.optionalString doCheck '' + # Build default lib test runners + ninja -j$NIX_BUILD_CORES all-test-runners + + ${fixNames} + + # Run dmd testsuite + export DMD_TESTSUITE_MAKE_ARGS="-j$NIX_BUILD_CORES DMD=$DMD CC=$CXX" + ctest -V -R "dmd-testsuite" + + # Build and run LDC D unittests. + ctest --output-on-failure -R "ldc2-unittest" + + # Run LIT testsuite. + ctest -V -R "lit-tests" + + # Run default lib unittests + ctest -j$NIX_BUILD_CORES --output-on-failure -E "ldc2-unittest|lit-tests|dmd-testsuite${additionalExceptions}" + ''; + + postInstall = '' + wrapProgram $out/bin/ldc2 \ + --prefix PATH ":" "${targetPackages.stdenv.cc}/bin" \ + --set-default CC "${targetPackages.stdenv.cc}/bin/cc" + ''; + + meta = with stdenv.lib; { + description = "The LLVM-based D compiler"; + homepage = "https://github.com/ldc-developers/ldc"; + # from https://github.com/ldc-developers/ldc/blob/master/LICENSE + license = with licenses; [ bsd3 boost mit ncsa gpl2Plus ]; + maintainers = with maintainers; [ ThomasMader ]; + platforms = [ "x86_64-linux" "i686-linux" "x86_64-darwin" ]; + }; } diff --git a/pkgs/development/compilers/ldc/generic.nix b/pkgs/development/compilers/ldc/generic.nix deleted file mode 100644 index c93d423945cb..000000000000 --- a/pkgs/development/compilers/ldc/generic.nix +++ /dev/null @@ -1,143 +0,0 @@ -{ version, ldcSha256 }: -{ stdenv, fetchurl, cmake, ninja, llvm_5, llvm_8, curl, tzdata -, libconfig, lit, gdb, unzip, darwin, bash -, callPackage, makeWrapper, runCommand, targetPackages -, ldcBootstrap ? callPackage ./bootstrap.nix { } -}: - -let - pathConfig = runCommand "ldc-lib-paths" {} '' - mkdir $out - echo ${tzdata}/share/zoneinfo/ > $out/TZDatabaseDirFile - echo ${curl.out}/lib/libcurl${stdenv.hostPlatform.extensions.sharedLibrary} > $out/LibcurlPathFile - ''; - -in - -stdenv.mkDerivation rec { - pname = "ldc"; - inherit version; - - enableParallelBuilding = true; - - src = fetchurl { - url = "https://github.com/ldc-developers/ldc/releases/download/v${version}/ldc-${version}-src.tar.gz"; - sha256 = ldcSha256; - }; - - # https://issues.dlang.org/show_bug.cgi?id=19553 - hardeningDisable = [ "fortify" ]; - - postUnpack = '' - patchShebangs . - '' - + '' - rm ldc-${version}-src/tests/d2/dmd-testsuite/fail_compilation/mixin_gc.d - rm ldc-${version}-src/tests/d2/dmd-testsuite/runnable/xtest46_gc.d - rm ldc-${version}-src/tests/d2/dmd-testsuite/runnable/testptrref_gc.d - - # test depends on current year - rm ldc-${version}-src/tests/d2/dmd-testsuite/compilable/ddocYear.d - '' - + stdenv.lib.optionalString stdenv.hostPlatform.isDarwin '' - # https://github.com/NixOS/nixpkgs/issues/34817 - rm -r ldc-${version}-src/tests/plugins/addFuncEntryCall - ''; - - postPatch = '' - # Setting SHELL=$SHELL when dmd testsuite is run doesn't work on Linux somehow - substituteInPlace tests/d2/dmd-testsuite/Makefile --replace "SHELL=/bin/bash" "SHELL=${bash}/bin/bash" - '' - + stdenv.lib.optionalString stdenv.hostPlatform.isLinux '' - substituteInPlace runtime/phobos/std/socket.d --replace "assert(ih.addrList[0] == 0x7F_00_00_01);" "" - '' - + stdenv.lib.optionalString stdenv.hostPlatform.isDarwin '' - substituteInPlace runtime/phobos/std/socket.d --replace "foreach (name; names)" "names = []; foreach (name; names)" - ''; - - nativeBuildInputs = [ - cmake ninja makeWrapper unzip ldcBootstrap lit lit.python - ] - ++ stdenv.lib.optionals stdenv.hostPlatform.isDarwin [ - darwin.apple_sdk.frameworks.Foundation - # https://github.com/NixOS/nixpkgs/issues/57120 - # https://github.com/NixOS/nixpkgs/pull/59197#issuecomment-481972515 - llvm_5 - ] - ++ stdenv.lib.optionals (!stdenv.hostPlatform.isDarwin) [ - llvm_8 - # https://github.com/NixOS/nixpkgs/pull/36378#issuecomment-385034818 - gdb - ]; - - buildInputs = [ curl tzdata ]; - - cmakeFlags = [ - "-DD_FLAGS=-d-version=TZDatabaseDir;-d-version=LibcurlPath;-J${pathConfig}" - "-DCMAKE_BUILD_TYPE=Release" - ]; - - postConfigure = '' - export DMD=$PWD/bin/ldmd2 - ''; - - makeFlags = [ "DMD=$DMD" ]; - - fixNames = stdenv.lib.optionalString stdenv.hostPlatform.isDarwin '' - fixDarwinDylibNames() { - local flags=() - - for fn in "$@"; do - flags+=(-change "$(basename "$fn")" "$fn") - done - - for fn in "$@"; do - if [ -L "$fn" ]; then continue; fi - echo "$fn: fixing dylib" - install_name_tool -id "$fn" "''${flags[@]}" "$fn" - done - } - - fixDarwinDylibNames $(find "$(pwd)/lib" -name "*.dylib") - export DYLD_LIBRARY_PATH=$(pwd)/lib - ''; - - # https://github.com/ldc-developers/ldc/issues/2497#issuecomment-459633746 - additionalExceptions = stdenv.lib.optionalString stdenv.hostPlatform.isDarwin - "|druntime-test-shared"; - - checkPhase = '' - # Build default lib test runners - ninja -j$NIX_BUILD_CORES all-test-runners - - ${fixNames} - - # Run dmd testsuite - export DMD_TESTSUITE_MAKE_ARGS="-j$NIX_BUILD_CORES DMD=$DMD" - ctest -V -R "dmd-testsuite" - - # Build and run LDC D unittests. - ctest --output-on-failure -R "ldc2-unittest" - - # Run LIT testsuite. - ctest -V -R "lit-tests" - - # Run default lib unittests - ctest -j$NIX_BUILD_CORES --output-on-failure -E "ldc2-unittest|lit-tests|dmd-testsuite${additionalExceptions}" - ''; - - postInstall = '' - wrapProgram $out/bin/ldc2 \ - --prefix PATH ":" "${targetPackages.stdenv.cc}/bin" \ - --set-default CC "${targetPackages.stdenv.cc}/bin/cc" - ''; - - meta = with stdenv.lib; { - description = "The LLVM-based D compiler"; - homepage = "https://github.com/ldc-developers/ldc"; - # from https://github.com/ldc-developers/ldc/blob/master/LICENSE - license = with licenses; [ bsd3 boost mit ncsa gpl2Plus ]; - maintainers = with maintainers; [ ThomasMader lionello ]; - platforms = [ "x86_64-linux" "i686-linux" "x86_64-darwin" ]; - }; -} diff --git a/pkgs/development/compilers/mint/default.nix b/pkgs/development/compilers/mint/default.nix index 7f5af5e834b0..d1d103c047fb 100644 --- a/pkgs/development/compilers/mint/default.nix +++ b/pkgs/development/compilers/mint/default.nix @@ -1,27 +1,36 @@ -{ lib, fetchFromGitHub, crystal, zlib, openssl, duktape, which, libyaml }: -crystal.buildCrystalPackage rec { - version = "0.7.1"; +{ lib, fetchFromGitHub, crystal_0_33, openssl }: + +let crystal = crystal_0_33; +in crystal.buildCrystalPackage rec { + version = "0.9.0"; pname = "mint"; + src = fetchFromGitHub { owner = "mint-lang"; repo = "mint"; rev = version; - sha256 = "18cg96kl4dn89bj6fm3080zzyd1r7rsfi17agdjjayd2v9fgs95l"; + sha256 = "0y1qr616x7s0pjgih6s1n4wiwb8kn8l1knnzmib6j4jmqax0jhz0"; }; - buildInputs = [ openssl ]; + postPatch = '' + export HOME=$TMP + ''; + + format = "shards"; # Update with # nix-shell -p crystal2nix --run crystal2nix # with mint's shard.lock file in the current directory shardsFile = ./shards.nix; - crystalBinaries.mint.src = "src/mint.cr"; - meta = { + buildInputs = [ openssl ]; + + meta = with lib; { description = "A refreshing language for the front-end web"; homepage = "https://mint-lang.com/"; - license = lib.licenses.bsd3; - maintainers = with lib.maintainers; [ manveru ]; + license = licenses.bsd3; + maintainers = with maintainers; [ manveru ]; platforms = [ "x86_64-linux" "i686-linux" "x86_64-darwin" ]; + broken = lib.versionOlder crystal.version "0.33"; }; } diff --git a/pkgs/development/compilers/mint/shards.nix b/pkgs/development/compilers/mint/shards.nix index b3583ac2cbaa..8e2b6b6ad4df 100644 --- a/pkgs/development/compilers/mint/shards.nix +++ b/pkgs/development/compilers/mint/shards.nix @@ -2,26 +2,26 @@ admiral = { owner = "jwaldrip"; repo = "admiral.cr"; - rev = "v1.7.3"; - sha256 = "0b98qjy43wsrc08am7lkhcdsxc7gplf9hcmbvd4p3dw4g107rk91"; + rev = "v1.9.0"; + sha256 = "0y8gsh1qz42bc9jawcrn0i49mzzfvf8znmivd8lybapf0f53fblz"; }; ameba = { - owner = "veelenga"; + owner = "crystal-ameba"; repo = "ameba"; - rev = "v0.10.1"; - sha256 = "0dcw7px7g0c5pxpdlirhirqzhcc7gdwdfiwb9kgm4x1k74ghjgxq"; + rev = "v0.12.0"; + sha256 = "0g68yijbm2j4ig536fwq49d1z7x2iv9kp4g3gjklf5zn1sbqhm12"; }; baked_file_system = { owner = "schovi"; repo = "baked_file_system"; - rev = "v0.9.7"; - sha256 = "1fi6zag1a6h4xwrfizy01dls3hhraqw0cmpwj7rjv1qcddjgig5z"; + rev = "v0.9.8"; + sha256 = "12l375jllg1lxvfh610dz0a39p803xw6q9fxlmnc6hy55i0gm0y3"; }; diff = { owner = "MakeNowJust"; repo = "crystal-diff"; - rev = "51962dc36f9bbb1b926d557f7cb8993a6c73cc63"; - sha256 = "1nwnsxm8srfw8jg0yfi2v19x6j3dadx62hq0xpxra40qcqz9dbnp"; + rev = "v1.1.0"; + sha256 = "1q5q2d5mp1r8c6k5v4755sb3b6awiz85d1j280djzhbd0pggk3z7"; }; dotenv = { owner = "gdotdesign"; @@ -32,14 +32,14 @@ exception_page = { owner = "crystal-loot"; repo = "exception_page"; - rev = "v0.1.2"; - sha256 = "0j5ishhyriq9p339yaawrmawl9wgmp1paniq30a8d6a0568h3avq"; + rev = "v0.1.4"; + sha256 = "0bsp2m89sl0bg9d5szbs1nxyk7yk58rkk24aibr39hhb5zi70pqi"; }; kemal = { owner = "kemalcr"; repo = "kemal"; - rev = "v0.25.1"; - sha256 = "1334i905xj6vlmp8acyybwwlaxsgmf90b59da7brzpnf28wci782"; + rev = "v0.26.1"; + sha256 = "169pwkjmk7x6j8i0rf5rpyk1y0hl7jaf9h6yrq4ha2ag9yq9i8fr"; }; kilt = { owner = "jeromegn"; diff --git a/pkgs/development/libraries/appstream-glib/default.nix b/pkgs/development/libraries/appstream-glib/default.nix index ceb4c238a7b0..5b777dff3ea2 100644 --- a/pkgs/development/libraries/appstream-glib/default.nix +++ b/pkgs/development/libraries/appstream-glib/default.nix @@ -23,7 +23,7 @@ , pngquant }: stdenv.mkDerivation rec { - name = "appstream-glib-0.7.16"; + name = "appstream-glib-0.7.17"; outputs = [ "out" "dev" "man" "installedTests" ]; outputBin = "dev"; @@ -32,7 +32,7 @@ stdenv.mkDerivation rec { owner = "hughsie"; repo = "appstream-glib"; rev = stdenv.lib.replaceStrings [ "." "-" ] [ "_" "_" ] name; - sha256 = "05x2pmsq18fcpgfvx0y54qdlryy5c9k3sxk6kgank8frkzhgnm9r"; + sha256 = "06pm8l58y0ladimyckbvlslr5bjj9rwb70rgjmn09l41pdpipy2i"; }; nativeBuildInputs = [ diff --git a/pkgs/development/libraries/icu/65.nix b/pkgs/development/libraries/icu/65.nix new file mode 100644 index 000000000000..c5074eea114d --- /dev/null +++ b/pkgs/development/libraries/icu/65.nix @@ -0,0 +1,4 @@ +import ./base.nix { + version = "65.1"; + sha256 = "0j6r6qqnhfr5iqkx53k63ifkm93kv1kkb7h2mlgd1mnnndk79qsk"; +} diff --git a/pkgs/development/libraries/icu/66.nix b/pkgs/development/libraries/icu/66.nix new file mode 100644 index 000000000000..5dfad945d291 --- /dev/null +++ b/pkgs/development/libraries/icu/66.nix @@ -0,0 +1,4 @@ +import ./base.nix { + version = "66.1"; + sha256 = "0bharwzc9nzkbrcf405z2nb3h7q0711z450arz0mjmdrk8hg58sj"; +} diff --git a/pkgs/development/libraries/icu/base.nix b/pkgs/development/libraries/icu/base.nix index 96b00027e207..81f75ad526a7 100644 --- a/pkgs/development/libraries/icu/base.nix +++ b/pkgs/development/libraries/icu/base.nix @@ -9,8 +9,7 @@ let baseAttrs = { src = fetchurl { - url = "http://download.icu-project.org/files/${pname}/${version}/${pname}-" - + (stdenv.lib.replaceChars ["."] ["_"] version) + "-src.tgz"; + url = "https://github.com/unicode-org/icu/releases/download/release-${lib.replaceChars [ "." ] [ "-" ] version}/icu4c-${lib.replaceChars [ "." ] [ "_" ] version}-src.tgz"; inherit sha256; }; diff --git a/pkgs/development/libraries/waylandpp/default.nix b/pkgs/development/libraries/waylandpp/default.nix index 59fac7bfe4a1..07de374c962a 100644 --- a/pkgs/development/libraries/waylandpp/default.nix +++ b/pkgs/development/libraries/waylandpp/default.nix @@ -1,21 +1,39 @@ -{ stdenv, fetchFromGitHub, cmake, pkgconfig, pugixml, wayland, libGL, libffi, buildPackages }: +{ stdenv +, fetchFromGitHub +, cmake +, pkgconfig +, pugixml +, wayland +, libGL +, libffi +, buildPackages +, docSupport ? true +, doxygen ? null +}: +assert docSupport -> doxygen != null; + +with stdenv.lib; stdenv.mkDerivation rec { pname = "waylandpp"; - version = "0.2.5"; + version = "0.2.7"; src = fetchFromGitHub { owner = "NilsBrause"; repo = pname; rev = version; - sha256 = "16h57hzd688664qcyznzhjp3hxipdkzgv46x82yhkww24av8b55n"; + sha256 = "1r4m0xhvwpcqxrqvp3hz1bzlkxqj2jiymd5r6hj8xjzz536hyprz"; }; cmakeFlags = stdenv.lib.optional (stdenv.hostPlatform != stdenv.buildPlatform) "-DWAYLAND_SCANNERPP=${buildPackages.waylandpp}/bin/wayland-scanner++"; - nativeBuildInputs = [ cmake pkgconfig ]; + nativeBuildInputs = [ cmake pkgconfig ] ++ optional docSupport doxygen; buildInputs = [ pugixml wayland libGL libffi ]; + outputs = [ "bin" "dev" "lib" "out" ] ++ optionals docSupport [ "doc" "devman" ]; + + cmakeFlags = [ "-DCMAKE_INSTALL_DATADIR=${placeholder "dev"}" ]; + meta = with stdenv.lib; { description = "Wayland C++ binding"; homepage = "https://github.com/NilsBrause/waylandpp/"; diff --git a/pkgs/development/python-modules/dotnetcore2/default.nix b/pkgs/development/python-modules/dotnetcore2/default.nix index 4d3edf0906a0..eeb962a845fd 100644 --- a/pkgs/development/python-modules/dotnetcore2/default.nix +++ b/pkgs/development/python-modules/dotnetcore2/default.nix @@ -7,7 +7,7 @@ buildPythonPackage rec { pname = "dotnetcore2"; - version = "2.1.11"; + version = "2.1.13"; format = "wheel"; disabled = isPy27; @@ -15,7 +15,7 @@ buildPythonPackage rec { inherit pname version format; python = "py3"; platform = "manylinux1_x86_64"; - sha256 = "0qhp94bjz4icz2f0fnhgck875chiqzy4lvsp6lwhj5jd0zsv2bb3"; + sha256 = "1fbg3pn7g0a6pg0gb5vaapcc3cdp6wfnliim57fn3cnzmx5d8p6i"; }; nativeBuildInputs = [ unzip ]; @@ -35,13 +35,9 @@ buildPythonPackage rec { ) ]; - # unfortunately the noraml pip install fails because the manylinux1 format check fails with NixOS - installPhase = '' - mkdir -p $out/${python.sitePackages}/${pname} - # copy metadata - cp -r dotnetcore2-2* $out/${python.sitePackages} - # copy non-dotnetcore related files - cp -r dotnetcore2/{__init__.py,runtime.py} $out/${python.sitePackages}/${pname} + # prevent exposing a broken dotnet executable + postInstall = '' + rm -r $out/${python.sitePackages}/${pname}/bin ''; # no tests, ensure it's one useful function works diff --git a/pkgs/development/python-modules/goobook/default.nix b/pkgs/development/python-modules/goobook/default.nix index f8daf66c1564..ac658b1940f4 100644 --- a/pkgs/development/python-modules/goobook/default.nix +++ b/pkgs/development/python-modules/goobook/default.nix @@ -12,6 +12,9 @@ buildPythonPackage rec { sha256 = "089a95s6g9izsy1fzpz48p6pz0wpngcbbrvsillm1n53492gfhjg"; }; + # Required for a breaking change in google-api-python-client 1.8.1: + patches = [ ./fix-build.patch ]; + propagatedBuildInputs = [ google_api_python_client simplejson oauth2client setuptools ]; diff --git a/pkgs/development/python-modules/goobook/fix-build.patch b/pkgs/development/python-modules/goobook/fix-build.patch new file mode 100644 index 000000000000..1121dbfdcb32 --- /dev/null +++ b/pkgs/development/python-modules/goobook/fix-build.patch @@ -0,0 +1,32 @@ +From 8de09b82c5ac900317043e1c1025f431516b6788 Mon Sep 17 00:00:00 2001 +From: Michael Weiss <dev.primeos@gmail.com> +Date: Tue, 21 Apr 2020 21:41:04 +0200 +Subject: [PATCH] Switch from the alias apiclient to googleapiclient + +This fixes the package after a breaking change / bug in +google-api-python-client 1.8.1 (see [0] and a lot of duplicate issues). + +The module apiclient is just an alias for googleapiclient [1]. + +[0]: https://github.com/googleapis/google-api-python-client/issues/870 +[1]: https://github.com/googleapis/google-api-python-client/blob/v1.8.1/apiclient/__init__.py +--- + goobook/goobook.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/goobook/goobook.py b/goobook/goobook.py +index 5bcb0b3..a2e25e9 100755 +--- a/goobook/goobook.py ++++ b/goobook/goobook.py +@@ -31,7 +31,7 @@ import sys + import time + + import httplib2 +-from apiclient.discovery import build ++from googleapiclient.discovery import build + + from goobook.storage import Storage, storageify, unstorageify + +-- +2.26.1 + diff --git a/pkgs/development/python-modules/google-api-python-client/default.nix b/pkgs/development/python-modules/google-api-python-client/default.nix index 2d7ae43f7f1e..ac7bcb5cd524 100644 --- a/pkgs/development/python-modules/google-api-python-client/default.nix +++ b/pkgs/development/python-modules/google-api-python-client/default.nix @@ -4,11 +4,11 @@ buildPythonPackage rec { pname = "google-api-python-client"; - version = "1.8.0"; + version = "1.8.2"; src = fetchPypi { inherit pname version; - sha256 = "003rgr15r9j080f3n5y2x6ymxsfv652m3r7j83p7sbrd9shl4nqg"; + sha256 = "09g7v6yrf8p0kgmjnzy9d0fx9p1zngk2pmprf0bx19j1zc9jqj5z"; }; # No tests included in archive diff --git a/pkgs/development/python-modules/matrix-nio/default.nix b/pkgs/development/python-modules/matrix-nio/default.nix index 9320efc91a23..ff4f6198aa5e 100644 --- a/pkgs/development/python-modules/matrix-nio/default.nix +++ b/pkgs/development/python-modules/matrix-nio/default.nix @@ -20,13 +20,13 @@ buildPythonPackage rec { pname = "nio"; - version = "0.9.0"; + version = "0.10.0"; src = fetchFromGitHub { owner = "poljar"; repo = "matrix-nio"; rev = version; - sha256 = "0gqhk9d06w1in6dj7aqy45skzyg8018nmclqd5r0m5nnw8yns6gz"; + sha256 = "04ryf9lrm0820hqij46hav6mgplabnyl9dfj46iwvxasn06fh2j8"; }; nativeBuildInputs = [ @@ -56,6 +56,6 @@ buildPythonPackage rec { description = "A Python Matrix client library, designed according to sans I/O principles"; homepage = "https://github.com/poljar/matrix-nio"; license = licenses.isc; - maintainers = with maintainers; [ tilpner emily ]; + maintainers = with maintainers; [ tilpner emily symphorien ]; }; } diff --git a/pkgs/development/python-modules/pulsectl/default.nix b/pkgs/development/python-modules/pulsectl/default.nix new file mode 100644 index 000000000000..dec80abda151 --- /dev/null +++ b/pkgs/development/python-modules/pulsectl/default.nix @@ -0,0 +1,31 @@ +{ lib, buildPythonPackage, fetchPypi, libpulseaudio, glibc, substituteAll, stdenv, pulseaudio, python }: + +buildPythonPackage rec { + pname = "pulsectl"; + version = "20.4.3"; + + src = fetchPypi { + inherit pname version; + sha256 = "1m5fz740r4rk2i8qsnblsn16hai7givqxbx21swhpflan1yzvzzm"; + }; + + patches = [ + (substituteAll { + src = ./library-paths.patch; + libpulse = "${libpulseaudio.out}/lib/libpulse${stdenv.hostPlatform.extensions.sharedLibrary}"; + librt = "${glibc.out}/lib/librt${stdenv.hostPlatform.extensions.sharedLibrary}"; + }) + ]; + + checkInputs = [ pulseaudio ]; + checkPhase = '' + ${python.interpreter} -m unittest pulsectl.tests.all + ''; + + meta = with lib; { + description = "Python high-level interface and ctypes-based bindings for PulseAudio (libpulse)"; + homepage = "https://pypi.python.org/pypi/pulsectl/"; + license = licenses.mit; + maintainers = with maintainers; [ hexa ]; + }; +} diff --git a/pkgs/development/python-modules/pulsectl/library-paths.patch b/pkgs/development/python-modules/pulsectl/library-paths.patch new file mode 100644 index 000000000000..5840e515258d --- /dev/null +++ b/pkgs/development/python-modules/pulsectl/library-paths.patch @@ -0,0 +1,22 @@ +diff --git a/pulsectl/_pulsectl.py b/pulsectl/_pulsectl.py +index 4422ddf..3fb2f39 100644 +--- a/pulsectl/_pulsectl.py ++++ b/pulsectl/_pulsectl.py +@@ -31,7 +31,7 @@ else: + if not hasattr(mono_time, 'ts'): + class timespec(Structure): + _fields_ = [('tv_sec', c_long), ('tv_nsec', c_long)] +- librt = CDLL('librt.so.1', use_errno=True) ++ librt = CDLL('@librt@', use_errno=True) + mono_time.get = librt.clock_gettime + mono_time.get.argtypes = [c_int, POINTER(timespec)] + mono_time.ts = timespec +@@ -625,7 +625,7 @@ class LibPulse(object): + + + def __init__(self): +- p = CDLL(ctypes.util.find_library('libpulse') or 'libpulse.so.0') ++ p = CDLL('@libpulse@') + + self.funcs = dict() + for k, spec in self.func_defs.items(): diff --git a/pkgs/development/python-modules/pylatexenc/default.nix b/pkgs/development/python-modules/pylatexenc/default.nix index 146aed9a3ecf..d4f14f3be014 100644 --- a/pkgs/development/python-modules/pylatexenc/default.nix +++ b/pkgs/development/python-modules/pylatexenc/default.nix @@ -1,30 +1,28 @@ { lib , buildPythonPackage , fetchFromGitHub -, pytest +, pytestCheckHook }: buildPythonPackage rec { pname = "pylatexenc"; - version = "2.1"; + version = "2.2"; src = fetchFromGitHub { owner = "phfaist"; - repo = pname; + repo = "pylatexenc"; rev = "v${version}"; - sha256 = "0wnl00y5dl56aw9j4y21kqapraaravbycwfxdmjsbgl11nk4llx9"; + sha256 = "0icwd7iipz3sv4jdh9iam7h4xslvdqg16rwsmczrna3mmjbwccdk"; }; pythonImportsCheck = [ "pylatexenc" ]; - checkInputs = [ pytest ]; - checkPhase = '' - pytest - ''; + dontUseSetuptoolsCheck = true; + checkInputs = [ pytestCheckHook ]; meta = with lib; { description = "Simple LaTeX parser providing latex-to-unicode and unicode-to-latex conversion"; homepage = "https://pylatexenc.readthedocs.io"; - downloadPage = "https;//www.github.com/phfaist/pylatexenc"; + downloadPage = "https://www.github.com/phfaist/pylatexenc/releases"; license = licenses.mit; maintainers = with maintainers; [ drewrisinger ]; }; diff --git a/pkgs/development/python-modules/pyroma/default.nix b/pkgs/development/python-modules/pyroma/default.nix new file mode 100644 index 000000000000..4ec06506b38b --- /dev/null +++ b/pkgs/development/python-modules/pyroma/default.nix @@ -0,0 +1,21 @@ +{ stdenv, buildPythonPackage, fetchPypi +, docutils, pygments, setuptools +}: + +buildPythonPackage rec { + pname = "pyroma"; + version = "2.6"; + + src = fetchPypi { + inherit pname version; + sha256 = "00j1j81kiipi5yppmk385cbfccf2ih0xyapl7pw6nqhrf8vh1764"; + }; + + propagatedBuildInputs = [ docutils pygments setuptools ]; + + meta = with stdenv.lib; { + description = "Test your project's packaging friendliness"; + homepage = "https://github.com/regebro/pyroma"; + license = licenses.mit; + }; +} diff --git a/pkgs/development/python-modules/pytest/4.nix b/pkgs/development/python-modules/pytest/4.nix index be2ef93e6ee5..d77e52ab7f6d 100644 --- a/pkgs/development/python-modules/pytest/4.nix +++ b/pkgs/development/python-modules/pytest/4.nix @@ -6,11 +6,6 @@ buildPythonPackage rec { version = "4.6.8"; pname = "pytest"; - preCheck = '' - # don't test bash builtins - rm testing/test_argcomplete.py - ''; - src = fetchPypi { inherit pname version; sha256 = "6192875be8af57b694b7c4904e909680102befcb99e610ef3d9f786952f795aa"; @@ -25,7 +20,14 @@ buildPythonPackage rec { doCheck = !isPyPy; # https://github.com/pytest-dev/pytest/issues/3460 checkPhase = '' runHook preCheck - $out/bin/py.test -x testing/ -k "not test_collect_pyargs_with_testpaths" + + # don't test bash builtins + rm testing/test_argcomplete.py + + # determinism - this test writes non deterministic bytecode + rm -rf testing/test_assertrewrite.py + + PYTHONDONTWRITEBYTECODE=1 $out/bin/py.test -x testing/ -k "not test_collect_pyargs_with_testpaths" runHook postCheck ''; diff --git a/pkgs/development/python-modules/simpleaudio/default.nix b/pkgs/development/python-modules/simpleaudio/default.nix new file mode 100644 index 000000000000..948716a9b7cb --- /dev/null +++ b/pkgs/development/python-modules/simpleaudio/default.nix @@ -0,0 +1,24 @@ +{ alsaLib, buildPythonPackage, fetchFromGitHub, isPy27, lib }: + +buildPythonPackage rec { + pname = "simpleaudio"; + version = "1.0.4"; + disabled = isPy27; + + src = fetchFromGitHub { + owner = "hamiltron"; + repo = "py-simple-audio"; + rev = version; + sha256 = "12nypzb1m14yip4zrbzin5jc5awyp1d5md5y40g5anj4phb4hx1i"; + }; + + buildInputs = [ alsaLib ]; + + meta = with lib; { + homepage = "https://github.com/hamiltron/py-simple-audio"; + description = + "A simple audio playback Python extension - cross-platform, asynchronous, dependency-free"; + license = licenses.mit; + maintainers = with maintainers; [ lucus16 ]; + }; +} diff --git a/pkgs/development/tools/ameba/default.nix b/pkgs/development/tools/ameba/default.nix index 2f3ebcbed0a6..a2d829f85c28 100644 --- a/pkgs/development/tools/ameba/default.nix +++ b/pkgs/development/tools/ameba/default.nix @@ -1,38 +1,16 @@ -{ stdenv, lib, fetchFromGitHub, crystal, shards }: +{ stdenv, lib, fetchFromGitHub, crystal }: -stdenv.mkDerivation rec { +crystal.buildCrystalPackage rec { pname = "ameba"; - version = "0.12.0"; + version = "0.12.1"; src = fetchFromGitHub { - owner = "crystal-ameba"; - repo = "ameba"; - rev = "v${version}"; - sha256 = "0g68yijbm2j4ig536fwq49d1z7x2iv9kp4g3gjklf5zn1sbqhm12"; + owner = "crystal-ameba"; + repo = "ameba"; + rev = "v${version}"; + sha256 = "0c2j2qki0czkpsqxv75qg95pk9f0w4rqa5ln07rs4bj9dk2lrr3l"; }; - nativeBuildInputs = [ crystal shards ]; - - buildPhase = '' - runHook preBuild - shards build --release - runHook postBuild - ''; - - installPhase = '' - runHook preInstall - install -Dm755 -t $out/bin bin/ameba - runHook postInstall - ''; - - doCheck = true; - - checkPhase = '' - runHook preCheck - crystal spec - runHook postCheck - ''; - meta = with stdenv.lib; { description = "A static code analysis tool for Crystal"; homepage = "https://crystal-ameba.github.io"; diff --git a/pkgs/development/tools/build-managers/shards/default.nix b/pkgs/development/tools/build-managers/shards/default.nix index 4ad78778a916..53bc057fc131 100644 --- a/pkgs/development/tools/build-managers/shards/default.nix +++ b/pkgs/development/tools/build-managers/shards/default.nix @@ -1,22 +1,29 @@ -{ stdenv, fetchFromGitHub, crystal, pcre, libyaml, which }: +{ stdenv, fetchFromGitHub, crystal }: crystal.buildCrystalPackage rec { pname = "shards"; version = "0.10.0"; src = fetchFromGitHub { - owner = "crystal-lang"; - repo = "shards"; - rev = "v${version}"; + owner = "crystal-lang"; + repo = "shards"; + rev = "v${version}"; sha256 = "1bjy3hcdqq8769bx73f3pwn26rnkj23dngyfbw4iv32bw23x1d49"; }; + # we cannot use `make` here as it would introduce a dependency on itself + format = "crystal"; + shardsFile = ./shards.nix; + crystalBinaries.shards.src = "./src/shards.cr"; + # tries to execute git which fails spectacularly + doCheck = false; + meta = with stdenv.lib; { description = "Dependency manager for the Crystal language"; - license = licenses.asl20; + license = licenses.asl20; maintainers = with maintainers; [ peterhoeg ]; inherit (crystal.meta) homepage platforms; }; diff --git a/pkgs/development/tools/continuous-integration/gitlab-runner/default.nix b/pkgs/development/tools/continuous-integration/gitlab-runner/default.nix index 1d94408bd21b..b18bea0c907f 100644 --- a/pkgs/development/tools/continuous-integration/gitlab-runner/default.nix +++ b/pkgs/development/tools/continuous-integration/gitlab-runner/default.nix @@ -1,16 +1,16 @@ { lib, buildGoPackage, fetchFromGitLab, fetchurl }: let - version = "12.9.0"; + version = "12.10.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}/helper-images/prebuilt-x86_64.tar.xz"; - sha256 = "0kd4zc9rgzsl6imk9vi2yqpaxrgy8ywcz2vvpsfzrhhmm2yx3qh0"; + sha256 = "1a2cfr72b15h3ymxf69a0inb4amfxivdhfaj711wgyvcf5ymnbsv"; }; docker_arm = fetchurl { url = "https://gitlab-runner-downloads.s3.amazonaws.com/v${version}/helper-images/prebuilt-arm.tar.xz"; - sha256 = "13xwcvw6m3p5ffas5mr55jkqks9s3f7qg1b928vcxkx57j06kb22"; + sha256 = "18if2xbkldpn0bwfyk6bgbdl9rdg4rjxc0im6lclwcgpbmslwx5r"; }; in buildGoPackage rec { @@ -29,7 +29,7 @@ buildGoPackage rec { owner = "gitlab-org"; repo = "gitlab-runner"; rev = "v${version}"; - sha256 = "0p9i4z0xsq5rl6gkqjpwpz6hb57vi6wl969gncrsfskjjc1kcifq"; + sha256 = "0bsd3dk2fi21klqwzw8c181gv61qxbd32lj6mhkj9liz4flarhmv"; }; patches = [ ./fix-shell-path.patch ]; diff --git a/pkgs/development/tools/database/ephemeralpg/default.nix b/pkgs/development/tools/database/ephemeralpg/default.nix index 87b23d10f496..53f3c1df628d 100644 --- a/pkgs/development/tools/database/ephemeralpg/default.nix +++ b/pkgs/development/tools/database/ephemeralpg/default.nix @@ -1,10 +1,10 @@ { stdenv, fetchurl, postgresql, getopt, makeWrapper }: stdenv.mkDerivation rec { pname = "ephemeralpg"; - version = "2.9"; + version = "3.0"; src = fetchurl { url = "http://ephemeralpg.org/code/${pname}-${version}.tar.gz"; - sha256 = "1ghp3kya4lxvfwz3c022cx9vqf55jbf9sjw60bxjcb5sszklyc89"; + sha256 = "1j0g7g114ma7y7sadbng5p1ss1zsm9zpicm77qspym6565733vvh"; }; buildInputs = [ makeWrapper ]; installPhase = '' diff --git a/pkgs/development/tools/icr/default.nix b/pkgs/development/tools/icr/default.nix index 3a39d0ddf6bd..50a349d8ff71 100644 --- a/pkgs/development/tools/icr/default.nix +++ b/pkgs/development/tools/icr/default.nix @@ -1,28 +1,30 @@ -{ stdenv, fetchFromGitHub, crystal, shards, which -, openssl, readline, libyaml }: +{ stdenv, lib, fetchFromGitHub, crystal, shards, makeWrapper, pkgconfig, which +, openssl, readline, libyaml, zlib }: -stdenv.mkDerivation rec { +crystal.buildCrystalPackage rec { pname = "icr"; - version = "0.6.0"; + version = "0.8.0"; src = fetchFromGitHub { - owner = "crystal-community"; - repo = pname; - rev = "v${version}"; - sha256 = "0kkdqrxk4f4bqbb84mgjrk9r0fz1hsz95apvjsc49gav4c8xx3mb"; + owner = "crystal-community"; + repo = pname; + rev = "v${version}"; + sha256 = "1bz2bhs6csyg2rhrlknlvaiilq3vq8plxjh1hdxmbrfi3n6c7k5a"; }; - postPatch = '' - substituteInPlace Makefile \ - --replace /usr/local $out - ''; + shardsFile = ./shards.nix; + + buildInputs = [ libyaml openssl readline zlib ]; - buildInputs = [ crystal libyaml openssl readline ]; + nativeBuildInputs = [ makeWrapper pkgconfig which ]; - nativeBuildInputs = [ shards which ]; + # tests are failing due to our sandbox + doCheck = false; - doCheck = true; - checkTarget = "test"; + postFixup = '' + wrapProgram $out/bin/icr \ + --prefix PATH : ${lib.makeBinPath [ crystal shards makeWrapper which ]} + ''; meta = with stdenv.lib; { description = "Interactive console for the Crystal programming language"; diff --git a/pkgs/development/tools/icr/shards.nix b/pkgs/development/tools/icr/shards.nix new file mode 100644 index 000000000000..1dddd5a42c39 --- /dev/null +++ b/pkgs/development/tools/icr/shards.nix @@ -0,0 +1,8 @@ +{ + readline = { + owner = "crystal-lang"; + repo = "crystal-readline"; + rev = "0fb7d186da8e1b157998d98d1c96e99699b791eb"; + sha256 = "1rk27vw3ssldgnfgprwvz2gag02v4g6d6yg56b3sk9w3fn8jyyi8"; + }; +} diff --git a/pkgs/development/tools/ocaml/merlin/default.nix b/pkgs/development/tools/ocaml/merlin/default.nix index ed3d5efc789d..fa78e47951f3 100644 --- a/pkgs/development/tools/ocaml/merlin/default.nix +++ b/pkgs/development/tools/ocaml/merlin/default.nix @@ -2,13 +2,13 @@ buildDunePackage rec { pname = "merlin"; - version = "3.3.3"; + version = "3.3.4"; minimumOCamlVersion = "4.02.1"; src = fetchurl { url = "https://github.com/ocaml/merlin/releases/download/v${version}/merlin-v${version}.tbz"; - sha256 = "05dfkbpbb7nvs4g6y0iw7a9f73ygvhs9l45l2g56y7zagvs9x43j"; + sha256 = "12wxric6n3rmsn0w16xm8vjd8p5aw24cj76zw2x87qfwwgmy1kdd"; }; buildInputs = [ yojson ]; diff --git a/pkgs/development/tools/scry/default.nix b/pkgs/development/tools/scry/default.nix index 7bd3fa38332d..ed823896ad0f 100644 --- a/pkgs/development/tools/scry/default.nix +++ b/pkgs/development/tools/scry/default.nix @@ -1,6 +1,8 @@ -{ lib, fetchFromGitHub, crystal }: +{ lib, fetchFromGitHub, crystal_0_31, coreutils, shards, makeWrapper, which }: -crystal.buildCrystalPackage rec { +let crystal = crystal_0_31; + +in crystal.buildCrystalPackage rec { pname = "scry"; version = "0.8.1"; @@ -11,9 +13,27 @@ crystal.buildCrystalPackage rec { sha256 = "0ii4k9l3dgm1c9lllc8ni9dar59lrxik0v9iz7gk3d6v62wwnq79"; }; + # we are already testing for this, so we can ignore the failures + postPatch = '' + rm spec/scry/executable_spec.cr + ''; + + format = "crystal"; + + nativeBuildInputs = [ makeWrapper ]; + shardsFile = ./shards.nix; + crystalBinaries.scry.src = "src/scry.cr"; + postFixup = '' + wrapProgram $out/bin/scry \ + --prefix PATH : ${lib.makeBinPath [ crystal coreutils ]} + ''; + + # the binary doesn't take any arguments, so this will hang + doInstallCheck = false; + meta = with lib; { description = "Code analysis server for the Crystal programming language"; homepage = "https://github.com/crystal-lang-tools/scry"; diff --git a/pkgs/development/web/lucky-cli/default.nix b/pkgs/development/web/lucky-cli/default.nix new file mode 100644 index 000000000000..76f40de4ed13 --- /dev/null +++ b/pkgs/development/web/lucky-cli/default.nix @@ -0,0 +1,42 @@ +{ lib, fetchFromGitHub, crystal, makeWrapper, openssl }: + +crystal.buildCrystalPackage rec { + pname = "lucky-cli"; + version = "0.20.0"; + + src = fetchFromGitHub { + owner = "luckyframework"; + repo = "lucky_cli"; + rev = "v${version}"; + sha256 = "0n7fgnsivf39bkxpf7xgg9dqkam08axdn1j45wl1n0r4qmfkjs94"; + }; + + # the integration tests will try to clone a remote repos + postPatch = '' + rm -rf spec/integration + ''; + + format = "crystal"; + + lockFile = ./shard.lock; + shardsFile = ./shards.nix; + + crystalBinaries.lucky.src = "src/lucky.cr"; + + buildInputs = [ openssl ]; + + nativeBuildInputs = [ makeWrapper ]; + + postInstall = '' + wrapProgram $out/bin/lucky \ + --prefix PATH : ${lib.makeBinPath [ crystal ]} + ''; + + meta = with lib; { + description = + "A Crystal library for creating and running tasks. Also generates Lucky projects"; + license = licenses.mit; + maintainers = with maintainers; [ peterhoeg ]; + platforms = platforms.unix; + }; +} diff --git a/pkgs/development/web/lucky-cli/shard.lock b/pkgs/development/web/lucky-cli/shard.lock new file mode 100644 index 000000000000..6564e86624f7 --- /dev/null +++ b/pkgs/development/web/lucky-cli/shard.lock @@ -0,0 +1,5 @@ +version: 1.0 +shards: + teeplate: + github: luckyframework/teeplate + version: 0.8.1 diff --git a/pkgs/development/web/lucky-cli/shards.nix b/pkgs/development/web/lucky-cli/shards.nix new file mode 100644 index 000000000000..0fa5aec9e06d --- /dev/null +++ b/pkgs/development/web/lucky-cli/shards.nix @@ -0,0 +1,8 @@ +{ + teeplate = { + owner = "luckyframework"; + repo = "teeplate"; + rev = "v0.8.1"; + sha256 = "022jmmg3d2wq2xnhc63afldm9vrcr8xqn43s9i39d7qflrzrfc7v"; + }; +} diff --git a/pkgs/development/web/shopify-themekit/default.nix b/pkgs/development/web/shopify-themekit/default.nix new file mode 100644 index 000000000000..b8bc3deaca18 --- /dev/null +++ b/pkgs/development/web/shopify-themekit/default.nix @@ -0,0 +1,25 @@ +{ stdenv, buildGoPackage, fetchFromGitHub }: + +buildGoPackage rec { + pname = "shopify-themekit"; + version = "1.0.3"; + + goPackagePath = "github.com/Shopify/themekit/"; + + goDeps = ./shopify-themekit_deps.nix; + + src = fetchFromGitHub { + owner = "Shopify"; + repo = "themekit"; + rev = "v${version}"; + sha256 = "1780h33mf2h2lv6mr4xx3shfvsabr7w138yb59vvdgvjng9wjkg0"; + }; + + meta = with stdenv.lib; { + description = "A command line tool for shopify themes"; + homepage = "https://shopify.github.io/themekit/"; + license = licenses.mit; + maintainers = with maintainers; [ maintainers."1000101" ]; + platforms = platforms.all; + }; +} \ No newline at end of file diff --git a/pkgs/development/web/shopify-themekit/shopify-themekit_deps.nix b/pkgs/development/web/shopify-themekit/shopify-themekit_deps.nix new file mode 100644 index 000000000000..8a70c7cecd92 --- /dev/null +++ b/pkgs/development/web/shopify-themekit/shopify-themekit_deps.nix @@ -0,0 +1,300 @@ +# file generated from go.mod using vgo2nix (https://github.com/adisbladis/vgo2nix) +[ + { + goPackagePath = "github.com/VividCortex/ewma"; + fetch = { + type = "git"; + url = "https://github.com/VividCortex/ewma"; + rev = "v1.1.1"; + sha256 = "14v2dy5gqchjn7k0sd6cx59ms42v681r6xz7cb1kspp4b28a74rw"; + }; + } + { + goPackagePath = "github.com/aws/aws-sdk-go"; + fetch = { + type = "git"; + url = "https://github.com/aws/aws-sdk-go"; + rev = "1c16cd01d785"; + sha256 = "129iizv2rny2frg36057hayynpsdav53nhj41dia3mi2r6zyalny"; + }; + } + { + goPackagePath = "github.com/caarlos0/env"; + fetch = { + type = "git"; + url = "https://github.com/caarlos0/env"; + rev = "d0de832ed2fb"; + sha256 = "013shh38rs2jv4a2hsbix0hlanjr2a539akmkqkwwg0il9h3qmq2"; + }; + } + { + goPackagePath = "github.com/davecgh/go-spew"; + fetch = { + type = "git"; + url = "https://github.com/davecgh/go-spew"; + rev = "v1.1.1"; + sha256 = "0hka6hmyvp701adzag2g26cxdj47g21x6jz4sc6jjz1mn59d474y"; + }; + } + { + goPackagePath = "github.com/fatih/color"; + fetch = { + type = "git"; + url = "https://github.com/fatih/color"; + rev = "v1.7.0"; + sha256 = "0v8msvg38r8d1iiq2i5r4xyfx0invhc941kjrsg5gzwvagv55inv"; + }; + } + { + goPackagePath = "github.com/fsnotify/fsnotify"; + fetch = { + type = "git"; + url = "https://github.com/fsnotify/fsnotify"; + rev = "v1.4.7"; + sha256 = "07va9crci0ijlivbb7q57d2rz9h27zgn2fsm60spjsqpdbvyrx4g"; + }; + } + { + goPackagePath = "github.com/go-ini/ini"; + fetch = { + type = "git"; + url = "https://github.com/go-ini/ini"; + rev = "v1.25.4"; + sha256 = "0b6cql5ripbiyrm18d6bfd1rfjnwcbskppw3d0vb80l0wy72d0c6"; + }; + } + { + goPackagePath = "github.com/hashicorp/go-version"; + fetch = { + type = "git"; + url = "https://github.com/hashicorp/go-version"; + rev = "270f2f71b1ee"; + sha256 = "1d43wlp932nqbwkca4bhw8l4x6cg25jyh8l1s3814vddscfpfz2v"; + }; + } + { + goPackagePath = "github.com/imdario/mergo"; + fetch = { + type = "git"; + url = "https://github.com/imdario/mergo"; + rev = "v0.3.6"; + sha256 = "1lbzy8p8wv439sqgf0n21q52flf2wbamp6qa1jkyv6an0nc952q7"; + }; + } + { + goPackagePath = "github.com/inconshreveable/go-update"; + fetch = { + type = "git"; + url = "https://github.com/inconshreveable/go-update"; + rev = "8152e7eb6ccf"; + sha256 = "07czhspakpi7al004rm669cmf4h5l0vnygsm11280nkfn2zxqdi3"; + }; + } + { + goPackagePath = "github.com/inconshreveable/mousetrap"; + fetch = { + type = "git"; + url = "https://github.com/inconshreveable/mousetrap"; + rev = "v1.0.0"; + sha256 = "1mn0kg48xkd74brf48qf5hzp0bc6g8cf5a77w895rl3qnlpfw152"; + }; + } + { + goPackagePath = "github.com/jmespath/go-jmespath"; + fetch = { + type = "git"; + url = "https://github.com/jmespath/go-jmespath"; + rev = "0b12d6b521d8"; + sha256 = "1vv6hph8j6xgv7gwl9vvhlsaaqsm22sxxqmgmldi4v11783pc1ld"; + }; + } + { + goPackagePath = "github.com/joho/godotenv"; + fetch = { + type = "git"; + url = "https://github.com/joho/godotenv"; + rev = "v1.3.0"; + sha256 = "0ri8if0pc3x6jg4c3i8wr58xyfpxkwmcjk3rp8gb398a1aa3gpjm"; + }; + } + { + goPackagePath = "github.com/mattn/go-colorable"; + fetch = { + type = "git"; + url = "https://github.com/mattn/go-colorable"; + rev = "efa589957cd0"; + sha256 = "0kshi4hvm0ayrsxqxy0599iv81kryhd2fn9lwjyczpj593cq069r"; + }; + } + { + goPackagePath = "github.com/mattn/go-isatty"; + fetch = { + type = "git"; + url = "https://github.com/mattn/go-isatty"; + rev = "v0.0.4"; + sha256 = "0zs92j2cqaw9j8qx1sdxpv3ap0rgbs0vrvi72m40mg8aa36gd39w"; + }; + } + { + goPackagePath = "github.com/pmezard/go-difflib"; + fetch = { + type = "git"; + url = "https://github.com/pmezard/go-difflib"; + rev = "v1.0.0"; + sha256 = "0c1cn55m4rypmscgf0rrb88pn58j3ysvc2d0432dp3c6fqg6cnzw"; + }; + } + { + goPackagePath = "github.com/radovskyb/watcher"; + fetch = { + type = "git"; + url = "https://github.com/radovskyb/watcher"; + rev = "v1.0.6"; + sha256 = "1xlbrfgm6ha161szdjq2rab53plkdhmh5h86lpbk5g7fmq881945"; + }; + } + { + goPackagePath = "github.com/ryanuber/go-glob"; + fetch = { + type = "git"; + url = "https://github.com/ryanuber/go-glob"; + rev = "572520ed46db"; + sha256 = "0dzbpqp1h7gjmlm4irnh6lpbfz5zjc721jidibyvmxj7xcx3wp5d"; + }; + } + { + goPackagePath = "github.com/shibukawa/configdir"; + fetch = { + type = "git"; + url = "https://github.com/shibukawa/configdir"; + rev = "e180dbdc8da0"; + sha256 = "0vbma9jkwh0ifz8dk2ssgmy7aiaify63lpa0lah7i4dkkxr94c9z"; + }; + } + { + goPackagePath = "github.com/skratchdot/open-golang"; + fetch = { + type = "git"; + url = "https://github.com/skratchdot/open-golang"; + rev = "75fb7ed4208c"; + sha256 = "1b67imqbsdvg19vif1q1dfmapxy3v2anagacbql95fwnnw0v8jga"; + }; + } + { + goPackagePath = "github.com/spf13/cobra"; + fetch = { + type = "git"; + url = "https://github.com/spf13/cobra"; + rev = "7c4570c3ebeb"; + sha256 = "16amh0prlzqrrbg5j629sg0f688nfzfgn9sair8jyybqampr3wc7"; + }; + } + { + goPackagePath = "github.com/spf13/pflag"; + fetch = { + type = "git"; + url = "https://github.com/spf13/pflag"; + rev = "v1.0.2"; + sha256 = "005598piihl3l83a71ahj10cpq9pbhjck4xishx1b4dzc02r9xr2"; + }; + } + { + goPackagePath = "github.com/stretchr/objx"; + fetch = { + type = "git"; + url = "https://github.com/stretchr/objx"; + rev = "v0.1.1"; + sha256 = "0iph0qmpyqg4kwv8jsx6a56a7hhqq8swrazv40ycxk9rzr0s8yls"; + }; + } + { + goPackagePath = "github.com/stretchr/testify"; + fetch = { + type = "git"; + url = "https://github.com/stretchr/testify"; + rev = "v1.2.2"; + sha256 = "0dlszlshlxbmmfxj5hlwgv3r22x0y1af45gn1vd198nvvs3pnvfs"; + }; + } + { + goPackagePath = "github.com/vbauerster/mpb"; + fetch = { + type = "git"; + url = "https://github.com/vbauerster/mpb"; + rev = "v3.3.2"; + sha256 = "18m66b80iv9z768c15dqsx5mnjq6iaa6b5lckpdqnynqzkkvw8kk"; + }; + } + { + goPackagePath = "golang.org/x/crypto"; + fetch = { + type = "git"; + url = "https://go.googlesource.com/crypto"; + rev = "a1f597ede03a"; + sha256 = "0yiczljll72ip2vkxgd6052rhpaba37a68vf6si3v8s8s3g870lc"; + }; + } + { + goPackagePath = "golang.org/x/lint"; + fetch = { + type = "git"; + url = "https://go.googlesource.com/lint"; + rev = "d0100b6bd8b3"; + sha256 = "0b0amr9x4ji66iv9ayfx7zrfx52k1m5g66qfcxkgj80qrb1y2yn7"; + }; + } + { + goPackagePath = "golang.org/x/net"; + fetch = { + type = "git"; + url = "https://go.googlesource.com/net"; + rev = "1272bf9dcd53"; + sha256 = "1500gryd7jli7yjn4c927ppyllry8lxcmnsmpn7zxfd1k14q7nyv"; + }; + } + { + goPackagePath = "golang.org/x/sync"; + fetch = { + type = "git"; + url = "https://go.googlesource.com/sync"; + rev = "1d60e4601c6f"; + sha256 = "046jlanz2lkxq1r57x9bl6s4cvfqaic6p2xybsj8mq1120jv4rs6"; + }; + } + { + goPackagePath = "golang.org/x/sys"; + fetch = { + type = "git"; + url = "https://go.googlesource.com/sys"; + rev = "6c81ef8f67ca"; + sha256 = "1iqrral339vxb635ip5jjzn84aa86kb629kbp1w29qwyfzbs0yqi"; + }; + } + { + goPackagePath = "golang.org/x/text"; + fetch = { + type = "git"; + url = "https://go.googlesource.com/text"; + rev = "v0.3.0"; + sha256 = "0r6x6zjzhr8ksqlpiwm5gdd7s209kwk5p4lw54xjvz10cs3qlq19"; + }; + } + { + goPackagePath = "golang.org/x/tools"; + fetch = { + type = "git"; + url = "https://go.googlesource.com/tools"; + rev = "3f1ed9edd1b4"; + sha256 = "00d2h0df03gv57valad4wr3g2rc8dcn8w3ci783x9wzzc86y4giw"; + }; + } + { + goPackagePath = "gopkg.in/yaml.v1"; + fetch = { + type = "git"; + url = "https://gopkg.in/yaml.v1"; + rev = "9f9df34309c0"; + sha256 = "1r8d346szqa9x8q03wiycik5qy3d6w8qq4hs99z1p64q5lm0g7gm"; + }; + } +] |