Skip to content

kati: init at 2dde61 #26168

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
May 31, 2017
Merged

kati: init at 2dde61 #26168

merged 4 commits into from
May 31, 2017

Conversation

Gabriella439
Copy link
Contributor

Motivation for this change

We're trying to write a make2nix utility at Awake Networks, but due to the complexity of
Make's semantics we'd like to reuse the kati project to transform Makefiles to the simpler
ninja file format which we can then more easily translate to Nix derivations

The first step in this is adding kati to nixpkgs, which is what this change does

NOTE: This does not build on master most likely due to changes introduced in 6b999f3 which break the following chain of derivations:

  /nix/store/4dsy1vkny9938yqg5k5c3lg357v2dzha-python2.7-hypothesis-3.11.0.drv
  /nix/store/qp1dwblvm3wn4xq3x59rcz9ncaphhm2b-python2.7-cryptography1.8.1.drv
  /nix/store/dg59z5r33nrlm3622nan403zb7qj3zfn-python2.7-paramiko-2.1.1.drv
  /nix/store/4fz077qbsw2b6xvp7csmdyhbxikpj2bm-bazaar-2.7.0.drv
  /nix/store/c7p5sbpan0qa45n9x8gsnkqh9k32q969-go-1.8.3.drv
  /nix/store/jqf40zx08bkbz0zrsz8vx1v6f0masiy8-govers-20150109-3b5f175.drv
  /nix/store/m05bhn2c0bx4pwgl944a4njz58jrvkw6-kati-unstable-2017-05-23.drv

... but this does build on a fairly recent commit (4cbd5e4) so once the Python-related breakage is fixed this build should succeed again

cc: @taktoa (who is also using this to write a haskell2nix utility for incremental Haskell builds
by taking advantage of GHC's Makefile output)

Things done
  • Tested using sandboxing
    (nix.useSandbox on NixOS,
    or option build-use-sandbox in nix.conf
    on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • Linux
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Fits CONTRIBUTING.md.

Sorry, something went wrong.

@taktoa
Copy link
Member

taktoa commented May 28, 2017

I don't think go is needed, as kati was rewritten in C++. As I understand it, all the .go files in the repo are just historical artifacts, not actually relevant code.

@FRidh
Copy link
Member

FRidh commented May 28, 2017

@Gabriel439 hypothesis should build again as of b27a266.

Verified

This commit was signed with the committer’s verified signature.
vcunat Vladimír Čunát
@Gabriella439
Copy link
Contributor Author

@taktoa: The ckati binary built by the C++ build doesn't support generating ninja files from Makefiles like the kati executable does. In fact, as far as I can tell it isn't complete yet because it doesn't take any options and just serves as a very basic make replacement

@FRidh: Thanks! That fixed it

@taktoa
Copy link
Member

taktoa commented May 28, 2017

use ckati --ninja Makefile.

@pSub pSub added the 8.has: package (new) This PR adds a new package label May 28, 2017
@Gabriella439
Copy link
Contributor Author

I think this is ready now. This now uses the C++ build and I verified that I could generate .ninja files from Makefiles using the ckati executable

@fpletz
Copy link
Member

fpletz commented May 31, 2017

Squashed. Thanks!

@fpletz fpletz merged commit 0dd5e83 into NixOS:master May 31, 2017
@anka-213
Copy link
Contributor

@Gabriel439 Did you get anywhere with the make2nix project?

@Gabriella439
Copy link
Contributor Author

@anka-213: We did not pursue that in the end, mainly due to being blocked on the absence of support for recursive Nix at the time

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
8.has: package (new) This PR adds a new package
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants