mirror of
https://codeberg.org/demostf/frontend.git
synced 2026-06-03 10:14:13 +02:00
flake update
This commit is contained in:
parent
b8256eb410
commit
780d5fcf50
6 changed files with 94 additions and 90 deletions
10
docker.nix
10
docker.nix
|
|
@ -1,6 +1,6 @@
|
|||
{ dockerTools
|
||||
, demostf-frontend
|
||||
,
|
||||
{
|
||||
dockerTools,
|
||||
demostf-frontend,
|
||||
}:
|
||||
dockerTools.buildLayeredImage {
|
||||
name = "demostf/frontend";
|
||||
|
|
@ -11,9 +11,9 @@ dockerTools.buildLayeredImage {
|
|||
dockerTools.caCertificates
|
||||
];
|
||||
config = {
|
||||
Cmd = [ "demostf-frontend" ];
|
||||
Cmd = ["demostf-frontend"];
|
||||
ExposedPorts = {
|
||||
"80/tcp" = { };
|
||||
"80/tcp" = {};
|
||||
};
|
||||
Env = [
|
||||
"LISTEN_ADDRESS=0.0.0.0"
|
||||
|
|
|
|||
30
flake.lock
generated
30
flake.lock
generated
|
|
@ -2,11 +2,11 @@
|
|||
"nodes": {
|
||||
"crane": {
|
||||
"locked": {
|
||||
"lastModified": 1730060262,
|
||||
"narHash": "sha256-RMgSVkZ9H03sxC+Vh4jxtLTCzSjPq18UWpiM0gq6shQ=",
|
||||
"lastModified": 1739936662,
|
||||
"narHash": "sha256-x4syUjNUuRblR07nDPeLDP7DpphaBVbUaSoeZkFbGSk=",
|
||||
"owner": "ipetkov",
|
||||
"repo": "crane",
|
||||
"rev": "498d9f122c413ee1154e8131ace5a35a80d8fa76",
|
||||
"rev": "19de14aaeb869287647d9461cbd389187d8ecdb7",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
@ -22,11 +22,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1734353159,
|
||||
"narHash": "sha256-TDCUemm0azypG46OnVNISAcz6LDuMnD8rixps1NejfQ=",
|
||||
"lastModified": 1742215471,
|
||||
"narHash": "sha256-I/7CY1gd5R4b3rBlhcJyjCYcP+v/164g83uOT9HTfj0=",
|
||||
"owner": "nix-community",
|
||||
"repo": "flakelight",
|
||||
"rev": "8ea81fa76945397adb766e1f249238bab6e72079",
|
||||
"rev": "e40a1a8c6d18c761659ed88d7536310a7e604f7f",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
@ -44,11 +44,11 @@
|
|||
"rust-overlay": "rust-overlay"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1734789971,
|
||||
"narHash": "sha256-Krf10FGET5NRfrWcQjaaSpo6cSXM2Wyl84DqHttNghw=",
|
||||
"lastModified": 1740783063,
|
||||
"narHash": "sha256-nJ/tvNBWFNJtwtNG/KsqtVq4p3aitkEb1pRW0qHvmsk=",
|
||||
"owner": "icewind1991",
|
||||
"repo": "mill-scale",
|
||||
"rev": "ad3de3f1708ae23e9ebf2b4ef0f787366ddc45ee",
|
||||
"rev": "591ea924cfd3cd7932b385341fb0aad0a935bb46",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
@ -59,11 +59,11 @@
|
|||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1732981179,
|
||||
"narHash": "sha256-F7thesZPvAMSwjRu0K8uFshTk3ZZSNAsXTIFvXBT+34=",
|
||||
"lastModified": 1742136038,
|
||||
"narHash": "sha256-DDe16FJk18sadknQKKG/9FbwEro7A57tg9vB5kxZ8kY=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "62c435d93bf046a5396f3016472e8f7c8e2aed65",
|
||||
"rev": "a1185f4064c18a5db37c5c84e5638c78b46e3341",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
@ -105,11 +105,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1731897198,
|
||||
"narHash": "sha256-Ou7vLETSKwmE/HRQz4cImXXJBr/k9gp4J4z/PF8LzTE=",
|
||||
"lastModified": 1740277845,
|
||||
"narHash": "sha256-NNU0CdiaSbAeZ8tpDG4aFi9qtcdlItRvk8Xns9oBrVU=",
|
||||
"owner": "oxalica",
|
||||
"repo": "rust-overlay",
|
||||
"rev": "0be641045af6d8666c11c2c40e45ffc9667839b5",
|
||||
"rev": "f933070c29f9c1c5457447a51903f27f76ebb519",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
|
|||
68
flake.nix
68
flake.nix
|
|
@ -14,36 +14,42 @@
|
|||
flake = false;
|
||||
};
|
||||
};
|
||||
outputs = { mill-scale, npmlock2nix, ... }: mill-scale ./. {
|
||||
packageOpts = { demostf-frontend-node-modules, ... }: {
|
||||
preBuild = ''
|
||||
ln -s ${demostf-frontend-node-modules}/node_modules .
|
||||
'';
|
||||
outputs = {
|
||||
mill-scale,
|
||||
npmlock2nix,
|
||||
...
|
||||
}:
|
||||
mill-scale ./. {
|
||||
packageOpts = {demostf-frontend-node-modules, ...}: {
|
||||
preBuild = ''
|
||||
ln -s ${demostf-frontend-node-modules}/node_modules .
|
||||
'';
|
||||
};
|
||||
extraPaths = [
|
||||
./.sqlx
|
||||
./images
|
||||
./script
|
||||
./style
|
||||
];
|
||||
withOverlays = [
|
||||
(final: prev: {
|
||||
npmlock2nix = final.callPackage npmlock2nix {};
|
||||
})
|
||||
(final: prev: {
|
||||
nodejs-16_x = final.nodejs;
|
||||
demostf-frontend-toolchain = final.rust-bin.fromRustupToolchainFile ./rust-toolchain.toml;
|
||||
})
|
||||
(import ./nix/overlay.nix)
|
||||
];
|
||||
toolchain = pkgs: pkgs.rust-bin.fromRustupToolchainFile ./rust-toolchain.toml;
|
||||
tools = pkgs:
|
||||
with pkgs; [
|
||||
bacon
|
||||
cargo-edit
|
||||
nodejs
|
||||
nodePackages.svgo
|
||||
typescript
|
||||
sqlx-cli
|
||||
];
|
||||
};
|
||||
extraPaths = [
|
||||
./.sqlx
|
||||
./images
|
||||
./script
|
||||
./style
|
||||
];
|
||||
withOverlays = [
|
||||
(final: prev: {
|
||||
npmlock2nix = final.callPackage npmlock2nix { };
|
||||
})
|
||||
(final: prev: {
|
||||
nodejs-16_x = final.nodejs;
|
||||
demostf-frontend-toolchain = final.rust-bin.fromRustupToolchainFile ./rust-toolchain.toml;
|
||||
})
|
||||
(import ./nix/overlay.nix)
|
||||
];
|
||||
toolchain = pkgs: pkgs.rust-bin.fromRustupToolchainFile ./rust-toolchain.toml;
|
||||
tools = pkgs: with pkgs; [
|
||||
bacon
|
||||
cargo-edit
|
||||
nodejs
|
||||
nodePackages.svgo
|
||||
typescript
|
||||
sqlx-cli
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,12 +1,11 @@
|
|||
{ npmlock2nix
|
||||
, nodejs_20
|
||||
, lib
|
||||
,
|
||||
}:
|
||||
let
|
||||
{
|
||||
npmlock2nix,
|
||||
nodejs_20,
|
||||
lib,
|
||||
}: let
|
||||
inherit (lib.sources) sourceByRegex;
|
||||
in
|
||||
npmlock2nix.v2.node_modules {
|
||||
src = sourceByRegex ../. [ "package.*" ];
|
||||
nodejs = nodejs_20;
|
||||
}
|
||||
npmlock2nix.v2.node_modules {
|
||||
src = sourceByRegex ../. ["package.*"];
|
||||
nodejs = nodejs_20;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
prev: final: {
|
||||
demostf-frontend-node-modules = final.callPackage ./node_modules.nix { };
|
||||
demostf-frontend = final.callPackage ./package.nix { };
|
||||
demostf-frontend-docker = final.callPackage ./docker.nix { };
|
||||
demostf-frontend-node-modules = final.callPackage ./node_modules.nix {};
|
||||
demostf-frontend = final.callPackage ./package.nix {};
|
||||
demostf-frontend-docker = final.callPackage ./docker.nix {};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,39 +1,38 @@
|
|||
{ stdenv
|
||||
, makeRustPlatform
|
||||
, lib
|
||||
, demostf-frontend-toolchain
|
||||
, pkg-config
|
||||
, openssl
|
||||
, demostf-frontend-node-modules
|
||||
,
|
||||
}:
|
||||
let
|
||||
{
|
||||
stdenv,
|
||||
makeRustPlatform,
|
||||
lib,
|
||||
demostf-frontend-toolchain,
|
||||
pkg-config,
|
||||
openssl,
|
||||
demostf-frontend-node-modules,
|
||||
}: let
|
||||
inherit (lib.sources) sourceByRegex;
|
||||
rustPlatform = makeRustPlatform {
|
||||
rustc = demostf-frontend-toolchain;
|
||||
cargo = demostf-frontend-toolchain;
|
||||
};
|
||||
in
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "demostf-frontend";
|
||||
version = "0.1.0";
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "demostf-frontend";
|
||||
version = "0.1.0";
|
||||
|
||||
src = sourceByRegex ../. [ "Cargo.*" "(src|build|images|script|style|.sqlx)(/.*)?" ];
|
||||
src = sourceByRegex ../. ["Cargo.*" "(src|build|images|script|style|.sqlx)(/.*)?"];
|
||||
|
||||
buildInputs = [ openssl ];
|
||||
buildInputs = [openssl];
|
||||
|
||||
nativeBuildInputs = [ pkg-config ];
|
||||
nativeBuildInputs = [pkg-config];
|
||||
|
||||
preBuild = ''
|
||||
ln -s ${demostf-frontend-node-modules}/node_modules .
|
||||
'';
|
||||
preBuild = ''
|
||||
ln -s ${demostf-frontend-node-modules}/node_modules .
|
||||
'';
|
||||
|
||||
doCheck = false;
|
||||
doCheck = false;
|
||||
|
||||
cargoLock = {
|
||||
lockFile = ../Cargo.lock;
|
||||
outputHashes = {
|
||||
"jsx-dom-expressions-0.1.0" = "sha256-5TN9FBfPYznTkpL9ZtnKv3RghX7r8c2WvSL1sc+F0cw=";
|
||||
cargoLock = {
|
||||
lockFile = ../Cargo.lock;
|
||||
outputHashes = {
|
||||
"jsx-dom-expressions-0.1.0" = "sha256-5TN9FBfPYznTkpL9ZtnKv3RghX7r8c2WvSL1sc+F0cw=";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue