Package your project
Package your project
No Notifications
October
SMTWTFSFolder is Empty
FlakeA flake with inputs and outputs.Project filesA file in the example project.NixA plain Nix expression.
flake.nix~/my-project
- Inside
outputs, addpackages.x86_64-linux.my-project = pkgs.buildNpmPackage { };. - Set
pnameto"my-project",versionto"0.3.1", andsrcto./.. - Set
dontNpmBuildtotruebecause this project has no build script, andnpmDepsHashtopkgs.lib.fakeHashas a placeholder. - Inside
outputs, addpackages.x86_64-linux.default = inputs.self.packages.x86_64-linux.my-project;. - Remove the highlighted fake hash with Backspace.
- Type two quotes, then paste the hash between them with Ctrl+V.
default.nix.
- Add
buildNpmPackageto the function's arguments. - Keep the same
pname,version,src,dontNpmBuildandnpmDepsHash.
Read only
yurii@nixos: ~~
About
Support GNOMEGNOME needs your help. Please donate today.
Operating SystemNixOS 26.05 (Yarara)
Processornot available in the simulation
Memory4.0 GiB
Disk Capacity68.7 GB
For quick access, place your bookmarks here on the bookmarks toolbar.
Your project is a package now
The same project still has its development shell, and now it has a command someone else can run. flake.nix chooses the package set. default.nix asks for the dependencies and describes the package.
nixpkgs uses the same callPackage pattern.

