coder / cursor-arm

Cursor built for ARM Linux and Windows
https://cursor.com
MIT License
17 stars 0 forks source link

Recommendation: Package as a derivation #1

Open sarahec opened 5 days ago

sarahec commented 5 days ago

Since not everyone uses flakes, why not package your code in a derivation (using stdenv for the build phases)? You can use callPackage(path-to-derivation) to import it into the flake and ship both.

kylecarbs commented 5 days ago

Good idea. Will do now!

kylecarbs commented 5 days ago

@sarahec this is as simple as adding a default.nix with flake-compat, right?

(import (
  fetchTarball {
    url = "https://github.com/edolstra/flake-compat/archive/12c64ca55c1014cdc1b16ed5a804aa8576601ff2.tar.gz";
    sha256 = "0jm6nzb83wa6ai17ly9fzpqc40wg1viib8klq8lby54agpl213w5";
  }
) {
  src = ./.;
}).defaultNix
sarahec commented 5 days ago

That default.nix loads flake-compat for use in your flake.

I'm talking about the other way around: creating a straight derivation (e.g. package.nix) that could be used by itself or incorporated with callPackage(path-to-derivation)

kylecarbs commented 5 days ago

Ahh, I see.