After a recent upgrade of my NixOS installation I somehow lost a valuable ability to build cargo from source (which I achieved previously in some terribly hacky way).
How should I use nix-shell to properly add openssl and zlib to my environment?
let
pkgs = import <nixpkgs> {};
in
pkgs.rustStable.cargo
#pkgs.rustBeta.cargo
#pkgs.rustUnstable.cargo
And then run
% nix-shell --run zsh
(nix-shell) % export SSL_CERT_FILE='/etc/ssl/certs/ca-bundle.crt' # for some reason SSL_CERT_FILE is not present in nix-shell
(nix-shell) % cargo build
I've recently accidently the whole cargo project directory, and this page showed up in google, so here are instruction for developing Cargo with Nixos and nix-shell for future me:
jumpapp is a small utility which either brings focus to existing application window or launches the application. Basically, it's poor-mans version of awesome windows Win+number shortcuts, which, for some reason, don't have equivalents in any popular linux desktop environment.
Hey, thank you, @matklad from the past! I have a suggestion for improving your workflow: you can use shell.nix instead of default.nix, mkShell instead of mkDerivation and direnv to automatically activate the env.