ff-notes / ron

Haskell implementation of RON and RON-RDT
BSD 3-Clause "New" or "Revised" License
65 stars 9 forks source link

Copied LICENSE file to sub dirs. #125

Closed mputz86 closed 5 years ago

mputz86 commented 5 years ago

When ron sub-packages are used with nix build, the sub dirs are copied and therefore the link to the LICENSE file in the parent can not be found.


This change is Reviewable

cblp commented 5 years ago

Why does nix copy files? Can it copy with cp --dereference?

cblp commented 5 years ago

Can you build your project with stack or cabal-install and then copy executables only?

mputz86 commented 5 years ago

Why does nix copy files? Can it copy with cp --dereference?

With my knowledge of nix, I dont know if there is a solution like this. I guess expressing the situation more correctly is, that nix assumes self-contained "projects" which can be built with cabal.

Can you build your project with stack or cabal-install and then copy executables only?

Hm, no, guess not. This is not the idea of nix. But I may be wrong.

Maybe we need somebody who is expert in nix to help us/me out.

mputz86 commented 5 years ago

For reference: here is the base of how the ron-git is used within my nix file:

https://gist.github.com/mputz86/3a48c964594966560da8ef4a172bf715

In essence it is:

    ron-storage = self.callCabal2nix "ron-storage" (ron-src + "/ron-storage") {};
    ron-schema = self.callCabal2nix "ron-schema" (ron-src + "/ron-schema") {};
    ron-rdt = self.callCabal2nix "ron-rdt" (ron-src + "/ron-rdt") {};
    ron = dontCheck (self.callCabal2nix "ron" (ron-src + "/ron") {});

The problem is the subdir reference.

cblp commented 5 years ago

Well, the source code wasn't intended to be used as a cabal package directly, only to be a source for cabal package. But I don't see a problem with such use. Let's make them proper packages.