Package with a flake.nix
parent
90e0274ff2
commit
fa14c5c2ed
|
@ -3,4 +3,5 @@
|
||||||
/lib/
|
/lib/
|
||||||
/marvin/
|
/marvin/
|
||||||
/marvin-*/
|
/marvin-*/
|
||||||
/node_modules
|
/node_modules
|
||||||
|
/result
|
||||||
|
|
|
@ -0,0 +1,2 @@
|
||||||
|
yarn-cache
|
||||||
|
src/*
|
|
@ -0,0 +1,2 @@
|
||||||
|
#!/usr/bin/env node
|
||||||
|
import "../lib/index.js"
|
|
@ -0,0 +1,45 @@
|
||||||
|
{
|
||||||
|
"nodes": {
|
||||||
|
"nix-npm-buildpackage": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": [
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1677562139,
|
||||||
|
"narHash": "sha256-J39FdMjECbWGSXVHmEdyGBD2aRYGhg9bWEPf1/ZR47k=",
|
||||||
|
"owner": "serokell",
|
||||||
|
"repo": "nix-npm-buildpackage",
|
||||||
|
"rev": "d45296118cae672982f192451dd3e19fa6c2d068",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "serokell",
|
||||||
|
"repo": "nix-npm-buildpackage",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nixpkgs": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1673796341,
|
||||||
|
"narHash": "sha256-1kZi9OkukpNmOaPY7S5/+SlCDOuYnP3HkXHvNDyLQcc=",
|
||||||
|
"path": "/nix/store/lzgxbh8c61phbh074y2707l2yw6vvaa1-source",
|
||||||
|
"rev": "6dccdc458512abce8d19f74195bb20fdb067df50",
|
||||||
|
"type": "path"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"id": "nixpkgs",
|
||||||
|
"type": "indirect"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"root": {
|
||||||
|
"inputs": {
|
||||||
|
"nix-npm-buildpackage": "nix-npm-buildpackage",
|
||||||
|
"nixpkgs": "nixpkgs"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"root": "root",
|
||||||
|
"version": 7
|
||||||
|
}
|
|
@ -0,0 +1,20 @@
|
||||||
|
{
|
||||||
|
inputs.nix-npm-buildpackage.url = "github:serokell/nix-npm-buildpackage";
|
||||||
|
inputs.nix-npm-buildpackage.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
outputs = { self, nixpkgs, nix-npm-buildpackage }: {
|
||||||
|
devShells.x86_64-linux.default = nixpkgs.legacyPackages.x86_64-linux.mkShell {
|
||||||
|
buildInputs = with nixpkgs.legacyPackages.x86_64-linux; [
|
||||||
|
yarn
|
||||||
|
nodePackages.typescript-language-server
|
||||||
|
];
|
||||||
|
};
|
||||||
|
packages.x86_64-linux.default = nix-npm-buildpackage.legacyPackages.x86_64-linux.buildYarnPackage {
|
||||||
|
src = ./.;
|
||||||
|
postBuild = ''
|
||||||
|
yarn install --production --ignore-scripts --prefer-offline
|
||||||
|
'';
|
||||||
|
postInstall = "rm $out/bin/yarn";
|
||||||
|
meta.mainProgram = "marvin-timesync";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
14
package.json
14
package.json
|
@ -1,9 +1,12 @@
|
||||||
{
|
{
|
||||||
"name": "timesync",
|
"name": "marvin-timesync",
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
|
"bin": {
|
||||||
|
"marvin-timesync": "./bin/marvin-timesync.js"
|
||||||
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@tsconfig/node18": "^1.0.2",
|
"@tsconfig/node18": "^1.0.2",
|
||||||
"@types/luxon": "^3.3.0",
|
"@types/luxon": "^3.3.0",
|
||||||
|
@ -16,5 +19,12 @@
|
||||||
"pouchdb-find": "^8.0.1",
|
"pouchdb-find": "^8.0.1",
|
||||||
"typescript": "^5.0.4",
|
"typescript": "^5.0.4",
|
||||||
"xdg-basedir": "^5.1.0"
|
"xdg-basedir": "^5.1.0"
|
||||||
}
|
},
|
||||||
|
"scripts": {
|
||||||
|
"watch": "exec tsc --noEmit -w",
|
||||||
|
"start": "exec tsx ./src/index.ts",
|
||||||
|
"test": "echo \"Error: no test specified\" && exit 1",
|
||||||
|
"prepare": "exec tsc"
|
||||||
|
},
|
||||||
|
"private": true
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue