mirror of
https://codeberg.org/demostf/edit.git
synced 2026-11-30 10:00:50 +01:00
nix package
This commit is contained in:
parent
099905e13c
commit
70edec329d
4 changed files with 91 additions and 87 deletions
83
flake.lock
generated
83
flake.lock
generated
|
|
@ -1,5 +1,25 @@
|
||||||
{
|
{
|
||||||
"nodes": {
|
"nodes": {
|
||||||
|
"flakelight": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": [
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1792489355,
|
||||||
|
"narHash": "sha256-2PmFySKU1QBQD2U8ni5Ww0Mj4VGG+JoWDdiUMe0rCMY=",
|
||||||
|
"owner": "nix-community",
|
||||||
|
"repo": "flakelight",
|
||||||
|
"rev": "3d088d158d9b0606298d33b80a55ecc1f592104e",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nix-community",
|
||||||
|
"repo": "flakelight",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1788982361,
|
"lastModified": 1788982361,
|
||||||
|
|
@ -15,39 +35,25 @@
|
||||||
"type": "indirect"
|
"type": "indirect"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nixpkgs_2": {
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1744536153,
|
|
||||||
"narHash": "sha256-awS2zRgF4uTwrOKwwiJcByDzDOdo3Q1rPZbiHQg/N38=",
|
|
||||||
"owner": "NixOS",
|
|
||||||
"repo": "nixpkgs",
|
|
||||||
"rev": "18dd725c29603f582cf1900e0d25f9f1063dbf11",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "NixOS",
|
|
||||||
"ref": "nixpkgs-unstable",
|
|
||||||
"repo": "nixpkgs",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"root": {
|
"root": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
|
"flakelight": "flakelight",
|
||||||
"nixpkgs": "nixpkgs",
|
"nixpkgs": "nixpkgs",
|
||||||
"rust-overlay": "rust-overlay",
|
"rust-overlay": "rust-overlay"
|
||||||
"utils": "utils"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"rust-overlay": {
|
"rust-overlay": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs": "nixpkgs_2"
|
"nixpkgs": [
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1788938153,
|
"lastModified": 1792913333,
|
||||||
"narHash": "sha256-czAKV0qN7TtdlGIREdDAJmoATGH0lfF7wNO8OMVToCw=",
|
"narHash": "sha256-wjoZGhxH/Yr+OsFRpNyV9DpMGQIdNEjjAOinfzQvadk=",
|
||||||
"owner": "oxalica",
|
"owner": "oxalica",
|
||||||
"repo": "rust-overlay",
|
"repo": "rust-overlay",
|
||||||
"rev": "5280ed136f4359ce3f977b0c4c4dab6a34254201",
|
"rev": "fad80eb74614f7dc37c1c83df8caae64361eda22",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
@ -55,39 +61,6 @@
|
||||||
"repo": "rust-overlay",
|
"repo": "rust-overlay",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
|
||||||
"systems": {
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1681028828,
|
|
||||||
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
|
||||||
"owner": "nix-systems",
|
|
||||||
"repo": "default",
|
|
||||||
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "nix-systems",
|
|
||||||
"repo": "default",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"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"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"root": "root",
|
"root": "root",
|
||||||
|
|
|
||||||
73
flake.nix
73
flake.nix
|
|
@ -1,43 +1,52 @@
|
||||||
{
|
{
|
||||||
inputs = {
|
inputs = {
|
||||||
utils.url = "github:numtide/flake-utils";
|
|
||||||
nixpkgs.url = "nixpkgs/release-26.05";
|
nixpkgs.url = "nixpkgs/release-26.05";
|
||||||
rust-overlay.url = "github:oxalica/rust-overlay";
|
flakelight = {
|
||||||
|
url = "github:nix-community/flakelight";
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
};
|
||||||
|
rust-overlay = {
|
||||||
|
url = "github:oxalica/rust-overlay";
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = {
|
outputs = {
|
||||||
self,
|
flakelight,
|
||||||
nixpkgs,
|
|
||||||
utils,
|
|
||||||
rust-overlay,
|
rust-overlay,
|
||||||
|
...
|
||||||
}:
|
}:
|
||||||
utils.lib.eachDefaultSystem (system: let
|
flakelight ./. {
|
||||||
overlays = [(import rust-overlay)];
|
withOverlays = [
|
||||||
pkgs = import nixpkgs {
|
(import rust-overlay)
|
||||||
inherit system overlays;
|
(import ./nix/overlay.nix)
|
||||||
|
];
|
||||||
|
packages = {
|
||||||
|
demostf-edit = pkgs: pkgs.demostf-edit;
|
||||||
};
|
};
|
||||||
in {
|
|
||||||
devShell = pkgs.mkShell {
|
|
||||||
nativeBuildInputs = with pkgs; [
|
|
||||||
(rust-bin.stable.latest.default.override {
|
|
||||||
targets = ["wasm32-unknown-unknown"];
|
|
||||||
})
|
|
||||||
rustc
|
|
||||||
cargo
|
|
||||||
bacon
|
|
||||||
cargo-edit
|
|
||||||
cargo-outdated
|
|
||||||
clippy
|
|
||||||
cargo-audit
|
|
||||||
hyperfine
|
|
||||||
valgrind
|
|
||||||
wasm-pack
|
|
||||||
pkg-config
|
|
||||||
nodejs
|
|
||||||
];
|
|
||||||
|
|
||||||
buildInputs = with pkgs; [openssl];
|
devShells.default = pkgs:
|
||||||
OPENSSL_NO_VENDOR = 1;
|
pkgs.mkShell {
|
||||||
};
|
nativeBuildInputs = with pkgs; [
|
||||||
});
|
(rust-bin.stable.latest.default.override {
|
||||||
|
targets = ["wasm32-unknown-unknown"];
|
||||||
|
})
|
||||||
|
rustc
|
||||||
|
cargo
|
||||||
|
bacon
|
||||||
|
cargo-edit
|
||||||
|
cargo-outdated
|
||||||
|
clippy
|
||||||
|
cargo-audit
|
||||||
|
hyperfine
|
||||||
|
valgrind
|
||||||
|
wasm-pack
|
||||||
|
pkg-config
|
||||||
|
nodejs
|
||||||
|
];
|
||||||
|
|
||||||
|
buildInputs = with pkgs; [openssl];
|
||||||
|
OPENSSL_NO_VENDOR = 1;
|
||||||
|
};
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
3
nix/overlay.nix
Normal file
3
nix/overlay.nix
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
final: prev: {
|
||||||
|
demostf-edit = final.callPackage ./package.nix { };
|
||||||
|
}
|
||||||
19
nix/package.nix
Normal file
19
nix/package.nix
Normal file
|
|
@ -0,0 +1,19 @@
|
||||||
|
{ rustPlatform }:
|
||||||
|
let
|
||||||
|
inherit (builtins) fromTOML readFile;
|
||||||
|
version = (fromTOML (readFile ../wasm/Cargo.toml)).package.version;
|
||||||
|
in
|
||||||
|
rustPlatform.buildRustPackage {
|
||||||
|
pname = "demostf-edit";
|
||||||
|
inherit version;
|
||||||
|
|
||||||
|
cargoBuildFlags = ''
|
||||||
|
--features cli
|
||||||
|
'';
|
||||||
|
|
||||||
|
src = ../wasm;
|
||||||
|
|
||||||
|
cargoLock = {
|
||||||
|
lockFile = ../wasm/Cargo.lock;
|
||||||
|
};
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue