Nix For Lang Packaging: Difference between revisions

imported>Zimbatm
Some thoughts on integrating Nix with $lang package managers
 
imported>Samueldr
m (syntaxhighlight!)
Line 9: Line 9:
The first integration usually looks like this:
The first integration usually looks like this:


  { stdenv, lang }:
<syntaxhighlight lang=nix>
  stdenv.mkDerivation {
{ stdenv, lang }:
    name = "my-package";
stdenv.mkDerivation {
    src = "...";
  name = "my-package";
    buildInputs = [ lang ];
  src = "...";
    buildPhase = '''
  buildInputs = [ lang ];
      lang build
  buildPhase = '''
    ''';
    lang build
    installPhase = '''
  ''';
      cp buildfolder $out
  installPhase = '''
    ''';
    cp buildfolder $out
  }
  ''';
}
</syntaxhighlight>


Where the `lang build` command:
Where the `lang build` command: