Created
January 30, 2022 10:24
-
-
Save luochen1990/6924a26e5e5cabf64632b4305506ac55 to your computer and use it in GitHub Desktop.
用 Nix 构建 C 项目的最简配置示例
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
#!/usr/bin/env nix-build | |
{ nixpkgs ? (import <nixpkgs> {}) }: with nixpkgs; | |
stdenv.mkDerivation rec { | |
pname = "some-c-project"; | |
version = "0.1"; | |
src = ./.; | |
nativeBuildInputs = [ cmake ]; #replace to your build time dependencies | |
buildInputs = [ libssl ]; #replace to your runtime dependencies | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment