Skip to content

Instantly share code, notes, and snippets.

@luochen1990
Created January 30, 2022 10:24
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 luochen1990/6924a26e5e5cabf64632b4305506ac55 to your computer and use it in GitHub Desktop.
Save luochen1990/6924a26e5e5cabf64632b4305506ac55 to your computer and use it in GitHub Desktop.
用 Nix 构建 C 项目的最简配置示例
#!/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