Created
November 29, 2019 14:46
-
-
Save ivan/a57be34f77e27d90ca4c4a7659373ae2 to your computer and use it in GitHub Desktop.
nix-shell wrapper for cargo to make cargo builds work on NixOS
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# A nix-shell that includes many packages, so that Cargo projects can build on NixOS. | |
set -eu | |
packages=( | |
pkgconfig | |
openssl | |
# druid | |
cairo | |
atk | |
gdk-pixbuf | |
pango | |
gtk3 | |
# imgui-rs | |
xorg.libxcb | |
# web-view | |
webkitgtk | |
) | |
args=() | |
for p in ${packages[@]}; do | |
args+=("-p" "$p") | |
done | |
nix-shell "${args[@]}" --run "$(printf '%q ' "$@")" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Usage: