Last active
September 17, 2022 20:32
-
-
Save walfie/22fb80062e766b288f61bb211f7d7eb1 to your computer and use it in GitHub Desktop.
nix flake devshell
This file contains hidden or 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
{ | |
inputs = { | |
nixpkgs.url = "github:nixos/nixpkgs?rev=d9a1414346059619d9e13ab93e749bbb82e5252a"; | |
}; | |
outputs = inputs @ { nixpkgs, ... }: | |
let | |
system = "x86_64-darwin"; | |
pkgs = import nixpkgs { inherit system; }; | |
# Use `nix-prefetch-url --unpack https://...` to get the sha256 | |
protobuf = pkgs.fetchzip { | |
url = "https://github.com/protocolbuffers/protobuf/releases/download/v21.6/protoc-21.6-osx-universal_binary.zip"; | |
sha256 = "05xysnjx29j8zv7jdwhy5vx06qwp9j3y2jkiszkzf6yvampqb8w8"; | |
}; | |
in | |
{ | |
devShells.${system}.default = pkgs.mkShell { | |
buildInputs = [ | |
protobuf | |
]; | |
}; | |
}; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment