chore(flake): get dependencies to install

This commit is contained in:
Elian Doran 2025-05-31 18:08:06 +03:00
parent 27dd097394
commit 5cd087f660
No known key found for this signature in database
2 changed files with 63 additions and 4 deletions

34
flake.lock generated
View File

@ -1,5 +1,23 @@
{ {
"nodes": { "nodes": {
"flake-utils": {
"inputs": {
"systems": "systems"
},
"locked": {
"lastModified": 1731533236,
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1748460289, "lastModified": 1748460289,
@ -18,8 +36,24 @@
}, },
"root": { "root": {
"inputs": { "inputs": {
"flake-utils": "flake-utils",
"nixpkgs": "nixpkgs" "nixpkgs": "nixpkgs"
} }
},
"systems": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
} }
}, },
"root": "root", "root": "root",

View File

@ -3,13 +3,38 @@
inputs = { inputs = {
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable"; nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
}; };
outputs = { self, nixpkgs }: { outputs = { self, nixpkgs, flake-utils }:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = import nixpkgs { inherit system; };
build = pkgs.stdenv.mkDerivation (finalAttrs: {
pname = "triliumnext-desktop";
version = "0.94.0";
src = pkgs.lib.cleanSource ./.;
packages.x86_64-linux.hello = nixpkgs.legacyPackages.x86_64-linux.hello; nativeBuildInputs = [
pkgs.pnpm.configHook
pkgs.nodejs
];
packages.x86_64-linux.default = self.packages.x86_64-linux.hello; buildPhase = ''
pnpm nx run desktop:build
'';
}; installPhase = ''
mkdir -p $out
'';
pnpmDeps = pkgs.pnpm.fetchDeps {
inherit (finalAttrs) pname version src;
hash = "sha256-xC0u1h92wtthylOAw+IF9mpFi0c4xajJhUcA9pqzcAw=";
};
});
in {
packages.default = build;
}
);
} }