Skip to content
This repository was archived by the owner on Apr 12, 2021. It is now read-only.
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs-channels
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 810b2fb4f3eb
Choose a base ref
...
head repository: NixOS/nixpkgs-channels
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 26f9a8a57387
Choose a head ref
  • 18 commits
  • 60 files changed
  • 8 contributors

Commits on Aug 26, 2019

  1. mint: Fix build

    infinisil committed Aug 26, 2019
    Copy the full SHA
    8c60f67 View commit details
  2. Copy the full SHA
    a3aec20 View commit details
  3. Copy the full SHA
    1ffdf01 View commit details
  4. Copy the full SHA
    2f92cd6 View commit details
  5. Copy the full SHA
    1d07491 View commit details

Commits on Aug 29, 2019

  1. crystal: Fix runtime by switching to openssl_1_0_2

    This makes `crystal play` work
    infinisil committed Aug 29, 2019

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    7f6a9ee View commit details
  2. tree: rename altcoins to blockchains

    Signed-off-by: William Casarin <jb55@jb55.com>
    jb55 committed Aug 29, 2019

    Unverified

    This commit is not signed, but one or more authors requires that any commit attributed to them is signed.
    Copy the full SHA
    72682e4 View commit details
  3. all-packages: add blockchains section

    Signed-off-by: William Casarin <jb55@jb55.com>
    jb55 committed Aug 29, 2019
    Copy the full SHA
    8d6cb26 View commit details
  4. blockchains: remove default.nix

    This is no longer needed
    
    Signed-off-by: William Casarin <jb55@jb55.com>
    jb55 committed Aug 29, 2019
    Copy the full SHA
    04ef817 View commit details
  5. Copy the full SHA
    8f4216b View commit details
  6. rsclock: 0.1.0 -> 0.1.4

    valebes committed Aug 29, 2019

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    b5fc76e View commit details
  7. Merge pull request #67687 from jb55/altcoin-reorg

    Remove altcoins set and create blockchains section
    mmahut authored Aug 29, 2019

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    bc08b42 View commit details
  8. nixos/bash: Improve Emacs detection for PS1

    That's one of my itches - when I'm sshing from Emacs' term to a NixOS
    machine, it doesn't detect that I'm running emacs and showing a title
    escape sequence. This commit fixes it, checking against $TERM to
    prevent this from ever bothering anyone again.
    Vika committed Aug 29, 2019
    Copy the full SHA
    844200a View commit details
  9. Merge pull request #67728 from kisik21/bash-module-emacs-eterm-remote…

    …-prompt-fix
    
    nixos/bash: Improve Emacs detection for PS1
    matthewbauer authored Aug 29, 2019
    Copy the full SHA
    c2ef4fd View commit details
  10. Merge pull request #67510 from Infinisil/crystal-infra

    Crystal package builder
    infinisil authored Aug 29, 2019

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    bfb06ec View commit details
  11. emacs-irony: shrink closure

    Goes from 1.6G -> 154M
    matthewbauer committed Aug 29, 2019

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    3155fbf View commit details

Commits on Aug 30, 2019

  1. pythonPackage.nixpart0: disable for python3

    Jonathan Ringer authored and Matthieu Coudron committed Aug 30, 2019

    Unverified

    This commit is not signed, but one or more authors requires that any commit attributed to them is signed.
    Copy the full SHA
    5fe68fd View commit details
  2. Merge pull request #67720 from valebes/rsclock-0.1.4

    rsclock: 0.1.0 -> 0.1.4
    mmahut authored Aug 30, 2019
    Copy the full SHA
    26f9a8a View commit details
Showing with 289 additions and 195 deletions.
  1. +71 −0 doc/languages-frameworks/crystal.section.md
  2. +1 −0 doc/languages-frameworks/index.xml
  3. +1 −1 nixos/modules/programs/bash/bash.nix
  4. +0 −90 pkgs/applications/altcoins/default.nix
  5. 0 pkgs/applications/{altcoins → blockchains}/aeon/default.nix
  6. 0 pkgs/applications/{altcoins → blockchains}/bitcoin-abc.nix
  7. 0 pkgs/applications/{altcoins → blockchains}/bitcoin-classic.nix
  8. 0 pkgs/applications/{altcoins → blockchains}/bitcoin-unlimited.nix
  9. 0 pkgs/applications/{altcoins → blockchains}/bitcoin.nix
  10. 0 pkgs/applications/{altcoins → blockchains}/btc1.nix
  11. 0 pkgs/applications/{altcoins → blockchains}/clightning.nix
  12. 0 pkgs/applications/{altcoins → blockchains}/cryptop/default.nix
  13. 0 pkgs/applications/{altcoins → blockchains}/dashpay.nix
  14. 0 pkgs/applications/{altcoins → blockchains}/dcrd.nix
  15. 0 pkgs/applications/{altcoins → blockchains}/dcrwallet.nix
  16. 0 pkgs/applications/{altcoins → blockchains}/dero.nix
  17. 0 pkgs/applications/{altcoins → blockchains}/dogecoin.nix
  18. 0 pkgs/applications/{altcoins → blockchains}/ethabi.nix
  19. 0 pkgs/applications/{altcoins → blockchains}/exodus/default.nix
  20. 0 pkgs/applications/{altcoins → blockchains}/fix-bitcoin-qt-build.patch
  21. 0 pkgs/applications/{altcoins → blockchains}/freicoin.nix
  22. 0 pkgs/applications/{altcoins → blockchains}/go-ethereum-classic/default.nix
  23. 0 pkgs/applications/{altcoins → blockchains}/go-ethereum-classic/deps.nix
  24. 0 pkgs/applications/{altcoins → blockchains}/go-ethereum.nix
  25. 0 pkgs/applications/{altcoins → blockchains}/jormungandr/default.nix
  26. 0 pkgs/applications/{altcoins → blockchains}/ledger-live-desktop/default.nix
  27. 0 pkgs/applications/{altcoins → blockchains}/litecoin.nix
  28. 0 pkgs/applications/{altcoins → blockchains}/lnd.nix
  29. 0 pkgs/applications/{altcoins → blockchains}/masari.nix
  30. 0 pkgs/applications/{altcoins → blockchains}/mist.nix
  31. 0 pkgs/applications/{altcoins → blockchains}/monero-gui/default.nix
  32. 0 pkgs/applications/{altcoins → blockchains}/monero-gui/move-log-file.patch
  33. 0 pkgs/applications/{altcoins → blockchains}/monero/default.nix
  34. 0 pkgs/applications/{altcoins → blockchains}/namecoin.nix
  35. 0 pkgs/applications/{altcoins → blockchains}/nano-wallet/CMakeLists.txt.patch
  36. 0 pkgs/applications/{altcoins → blockchains}/nano-wallet/default.nix
  37. 0 pkgs/applications/{altcoins → blockchains}/parity-ui/default.nix
  38. 0 pkgs/applications/{altcoins → blockchains}/parity-ui/env.nix
  39. 0 pkgs/applications/{altcoins → blockchains}/parity/beta.nix
  40. 0 pkgs/applications/{altcoins → blockchains}/parity/default.nix
  41. 0 pkgs/applications/{altcoins → blockchains}/parity/parity.nix
  42. 0 pkgs/applications/{altcoins → blockchains}/particl/particl-core.nix
  43. 0 pkgs/applications/{altcoins → blockchains}/pivx.nix
  44. 0 pkgs/applications/{altcoins → blockchains}/polkadot/default.nix
  45. 0 pkgs/applications/{altcoins → blockchains}/stellar-core-dirty-version.patch
  46. 0 pkgs/applications/{altcoins → blockchains}/stellar-core.nix
  47. 0 pkgs/applications/{altcoins → blockchains}/sumokoin.nix
  48. 0 pkgs/applications/{altcoins → blockchains}/wasabiwallet/default.nix
  49. 0 pkgs/applications/{altcoins → blockchains}/wownero.nix
  50. 0 pkgs/applications/{altcoins → blockchains}/zcash/default.nix
  51. 0 pkgs/applications/{altcoins → blockchains}/zcash/librustzcash/default.nix
  52. +4 −0 pkgs/applications/editors/emacs-modes/melpa-packages.nix
  53. +3 −3 pkgs/applications/misc/rsclock/default.nix
  54. +53 −0 pkgs/development/compilers/crystal/build-package.nix
  55. +1 −1 pkgs/development/compilers/{mint → crystal}/crystal2nix.cr
  56. +16 −0 pkgs/development/compilers/crystal/crystal2nix.nix
  57. +13 −6 pkgs/development/compilers/crystal/default.nix
  58. +11 −48 pkgs/development/compilers/mint/default.nix
  59. +8 −6 pkgs/tools/filesystems/nixpart/0.4/default.nix
  60. +107 −40 pkgs/top-level/all-packages.nix
71 changes: 71 additions & 0 deletions doc/languages-frameworks/crystal.section.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
# Crystal

## Building a Crystal package

This section uses [Mint](https://github.com/mint-lang/mint) as an example for how to build a Crystal package.

If the Crystal project has any dependencies, the first step is to get a `shards.nix` file encoding those. Get a copy of the project and go to its root directory such that its `shard.lock` file is in the current directory, then run `crystal2nix` in it
```bash
$ git clone https://github.com/mint-lang/mint
$ cd mint
$ git checkout 0.5.0
$ nix-shell -p crystal2nix --run crystal2nix
```

This should have generated a `shards.nix` file.

Next create a Nix file for your derivation and use `pkgs.crystal.buildCrystalPackage` as follows:
```nix
with import <nixpkgs> {};
crystal.buildCrystalPackage rec {
pname = "mint";
version = "0.5.0";
src = fetchFromGitHub {
owner = "mint-lang";
repo = "mint";
rev = version;
sha256 = "0vxbx38c390rd2ysvbwgh89v2232sh5rbsp3nk9wzb70jybpslvl";
};
# Insert the path to your shards.nix file here
shardsFile = ./shards.nix;
...
}
```

This won't build anything yet, because we haven't told it what files build. We can specify a mapping from binary names to source files with the `crystalBinaries` attribute. The project's compilation instructions should show this. For Mint, the binary is called "mint", which is compiled from the source file `src/mint.cr`, so we'll specify this as follows:

```nix
crystalBinaries.mint.src = "src/mint.cr";
# ...
```

Additionally you can override the default `crystal build` options (which are currently `--release --progress --no-debug --verbose`) with

```nix
crystalBinaries.mint.options = [ "--release" "--verbose" ];
```

Depending on the project, you might need additional steps to get it to compile successfully. In Mint's case, we need to link against openssl, so in the end the Nix file looks as follows:

```nix
with import <nixpkgs> {};
crystal.buildCrystalPackage rec {
version = "0.5.0";
pname = "mint";
src = fetchFromGitHub {
owner = "mint-lang";
repo = "mint";
rev = version;
sha256 = "0vxbx38c390rd2ysvbwgh89v2232sh5rbsp3nk9wzb70jybpslvl";
};
shardsFile = ./shards.nix;
crystalBinaries.mint.src = "src/mint.cr";
buildInputs = [ openssl_1_0_2 ];
}
```
1 change: 1 addition & 0 deletions doc/languages-frameworks/index.xml
Original file line number Diff line number Diff line change
@@ -32,4 +32,5 @@
<xi:include href="titanium.section.xml" />
<xi:include href="vim.section.xml" />
<xi:include href="emscripten.section.xml" />
<xi:include href="crystal.section.xml" />
</chapter>
2 changes: 1 addition & 1 deletion nixos/modules/programs/bash/bash.nix
Original file line number Diff line number Diff line change
@@ -98,7 +98,7 @@ in
if [ "$TERM" != "dumb" -o -n "$INSIDE_EMACS" ]; then
PROMPT_COLOR="1;31m"
let $UID && PROMPT_COLOR="1;32m"
if [ -n "$INSIDE_EMACS" ]; then
if [ -n "$INSIDE_EMACS" -o "$TERM" == "eterm" -o "$TERM" == "eterm-color" ]; then
# Emacs term mode doesn't support xterm title escape sequence (\e]0;)
PS1="\n\[\033[$PROMPT_COLOR\][\u@\h:\w]\\$\[\033[0m\] "
else
90 changes: 0 additions & 90 deletions pkgs/applications/altcoins/default.nix

This file was deleted.

File renamed without changes.
4 changes: 4 additions & 0 deletions pkgs/applications/editors/emacs-modes/melpa-packages.nix
Original file line number Diff line number Diff line change
@@ -131,6 +131,7 @@ env NIXPKGS_ALLOW_BROKEN=1 nix-instantiate --show-trace ../../../../ -A emacsPac

irony = super.irony.overrideAttrs (old: {
cmakeFlags = old.cmakeFlags or [] ++ [ "-DCMAKE_INSTALL_BINDIR=bin" ];
NIX_CFLAGS_COMPILE = "-UCLANG_RESOURCE_DIR";
preConfigure = ''
cd server
'';
@@ -144,6 +145,9 @@ env NIXPKGS_ALLOW_BROKEN=1 nix-instantiate --show-trace ../../../../ -A emacsPac
make check
cd ../..
'';
preFixup = ''
rm -rf $out/share/emacs/site-lisp/elpa/*/server
'';
dontUseCmakeBuildDir = true;
doCheck = true;
packageRequires = [ self.emacs ];
6 changes: 3 additions & 3 deletions pkgs/applications/misc/rsclock/default.nix
Original file line number Diff line number Diff line change
@@ -2,16 +2,16 @@

rustPlatform.buildRustPackage rec {
pname = "rsClock";
version = "0.1.0";
version = "0.1.4";

src = fetchFromGitHub {
owner = "valebes";
repo = pname;
rev = "v${version}";
sha256 = "1fpidswkgpf9yr4vxqn38livz6r3z5i0lhg7ngj9f1ki4yqxn9zh";
sha256 = "1i93qkz6d8sbk78i4rvx099hnn4lklp4cjvanpm9ssv8na4rqvh2";
};

cargoSha256 = "1m0lm8xh1qp0cbx870xy2m0bv047mb00vcwzq7r5gxqx8n61qm4n";
cargoSha256 = "0zg5q2p9snpfyxl0gx87ix1f46afrfm5jq0m6c7s8qw2x9hpvxzr";

meta = with stdenv.lib; {
description = "A simple terminal clock written in Rust";
53 changes: 53 additions & 0 deletions pkgs/development/compilers/crystal/build-package.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
{ stdenv, lib, crystal, linkFarm, fetchFromGitHub }:
{ # Generate shards.nix with `nix-shell -p crystal2nix --run crystal2nix` in the projects root
shardsFile ? null
# 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:
let
mkDerivationArgs = builtins.removeAttrs args [ "shardsFile" "crystalBinaries" ];

crystalLib = linkFarm "crystal-lib" (lib.mapAttrsToList (name: value: {
inherit name;
path = fetchFromGitHub value;
}) (import shardsFile));

defaultOptions = [ "--release" "--progress" "--no-debug" "--verbose" ];

in stdenv.mkDerivation (mkDerivationArgs // {

configurePhase = args.configurePhase or ''
runHook preConfigure
${lib.optionalString (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
'';

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
'';

meta = args.meta or {} // {
platforms = args.meta.platforms or crystal.meta.platforms;
};
})
Original file line number Diff line number Diff line change
@@ -26,7 +26,7 @@ File.open "shards.nix", "w+" do |file|

sha256 = ""
args = ["--url", url, "--rev", rev]
Process.run("nix-prefetch-git", args: args) do |x|
Process.run("@nixPrefetchGit@", args: args) do |x|
x.error.each_line { |e| puts e }
sha256 = PrefetchJSON.from_json(x.output).sha256
end
16 changes: 16 additions & 0 deletions pkgs/development/compilers/crystal/crystal2nix.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{ lib, crystal, nix-prefetch-git }:
crystal.buildCrystalPackage {
pname = "crystal2nix";
version = "unstable-2018-07-31";

nixPrefetchGit = "${lib.getBin nix-prefetch-git}/bin/nix-prefetch-git";
unpackPhase = "substituteAll ${./crystal2nix.cr} crystal2nix.cr";

crystalBinaries.crystal2nix.src = "crystal2nix.cr";

meta = with lib; {
description = "Utility to convert Crystal's shard.lock files to a Nix file";
license = licenses.mit;
maintainers = [ maintainers.manveru ];
};
}
19 changes: 13 additions & 6 deletions pkgs/development/compilers/crystal/default.nix
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{ stdenv, lib, fetchFromGitHub, fetchurl, makeWrapper
, coreutils, git, gmp, nettools, openssl, readline, tzdata, libxml2, libyaml
, boehmgc, libatomic_ops, pcre, libevent, libiconv, llvm, clang, which, zlib }:
, coreutils, git, gmp, nettools, openssl_1_0_2, readline, tzdata, libxml2, libyaml
, boehmgc, libatomic_ops, pcre, libevent, libiconv, llvm, clang, which, zlib
, callPackage }:

# We need multiple binaries as a given binary isn't always able to build
# (even slightly) older or newer versions.
@@ -19,7 +20,7 @@ let

arch = archs."${stdenv.system}" or (throw "system ${stdenv.system} not supported");

checkInputs = [ git gmp openssl readline libxml2 libyaml ];
checkInputs = [ git gmp openssl_1_0_2 readline libxml2 libyaml ];

genericBinary = { version, sha256s, rel ? 1 }:
stdenv.mkDerivation rec {
@@ -37,7 +38,7 @@ let
};

generic = { version, sha256, binary, doCheck ? true }:
stdenv.mkDerivation rec {
let compiler = stdenv.mkDerivation rec {
pname = "crystal";
inherit doCheck version;

@@ -72,7 +73,7 @@ let

buildInputs = [
boehmgc libatomic_ops pcre libevent libyaml
llvm zlib openssl
llvm zlib openssl_1_0_2
] ++ stdenv.lib.optionals stdenv.isDarwin [
libiconv
];
@@ -134,14 +135,18 @@ let
export PATH=${lib.makeBinPath checkInputs}:$PATH
'';

passthru.buildCrystalPackage = callPackage ./build-package.nix {
crystal = compiler;
};

meta = with lib; {
description = "A compiled language with Ruby like syntax and type inference";
homepage = https://crystal-lang.org/;
license = licenses.asl20;
maintainers = with maintainers; [ manveru david50407 peterhoeg ];
platforms = builtins.attrNames archs;
};
};
}; in compiler;

in rec {
binaryCrystal_0_26 = genericBinary {
@@ -207,4 +212,6 @@ in rec {
};

crystal = crystal_0_30;

crystal2nix = callPackage ./crystal2nix.nix {};
}
Loading