Skip to content

Instantly share code, notes, and snippets.

@tilpner
Created October 18, 2017 10:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tilpner/8354b042dce0d63a7e8c480b3a57630c to your computer and use it in GitHub Desktop.
Save tilpner/8354b042dce0d63a7e8c480b3a57630c to your computer and use it in GitHub Desktop.
with (import <nixpkgs> {}).unstable;
with builtins;
rustPlatform.buildRustPackage rec {
name = "weematrix";
version = "0.1.0";
ignore = map toString [
./target
./weechat/target
./default.nix
./vendor
./weechat-config
];
src = filterSource (path: type: !elem path ignore) ./.;
rustRegistry = pkgs.rustRegistry.overrideAttrs (old: {
src = fetchFromGitHub {
owner = "rust-lang";
repo = "crates.io-index";
rev = "1173c717e1da601f82f7e685fe2479ded4cb0ac8";
sha256 = "11mqjgpa3xvx670cg1p5h4dj25yaaw37f0pwxsvlqi5364bvwdz9";
};
});
depsSha256 = "1qrxs3p05j842bxfrpxmmjm2w14ysdn7qnsrqn6na7q6qvdkwd6d";
# required for the bindgen buildscript to find libclang
LIBCLANG_PATH = "${llvmPackages.clang-unwrapped}/lib";
shellHook = ''
export NIX_ENFORCE_PURITY=0
exec ${zsh}/bin/zsh
'';
nativeBuildInputs = with pkgs; [
pkgconfig
stdenv
glibc
openssl
llvmPackages.clang-unwrapped
(rustChannelOf {
channel = "nightly";
date = "2017-09-04";
}).rust
weechat
rustracer
rustfmt
];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment