build successfully in nix
This commit is contained in:
parent
ef3164f1af
commit
0dd1df7e1d
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -1 +1,2 @@
|
|||
/target
|
||||
/result
|
||||
|
|
18
Cargo.lock
generated
18
Cargo.lock
generated
|
@ -829,15 +829,6 @@ dependencies = [
|
|||
"autocfg",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "neon-gtk"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"gtk4",
|
||||
"libadwaita",
|
||||
"webrender",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "num-traits"
|
||||
version = "0.2.16"
|
||||
|
@ -1406,6 +1397,15 @@ dependencies = [
|
|||
"euclid",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "xenon-browser"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"gtk4",
|
||||
"libadwaita",
|
||||
"webrender",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "xml-rs"
|
||||
version = "0.8.16"
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
[package]
|
||||
name = "neon-gtk"
|
||||
name = "xenon-browser"
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
|
||||
|
|
31
default.nix
31
default.nix
|
@ -1,11 +1,26 @@
|
|||
with import <nixpkgs> {};
|
||||
{ lib, fetchFromGitHub, rustPlatform, cmake, pkg-config, gtk4, gdk-pixbuf, cairo, libadwaita, pango }:
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "xenon-browser";
|
||||
version = "0.1.0";
|
||||
|
||||
let
|
||||
rustChannel = rustChannelOf {
|
||||
channel = "stable";
|
||||
date = "2023-08-16";
|
||||
};
|
||||
in
|
||||
rustChannel.workspaceMembers.libadwaita.build.override {
|
||||
src = ./.;
|
||||
|
||||
buildInputs = [ gtk4 gdk-pixbuf cairo libadwaita pango ];
|
||||
nativeBuildInputs = [cmake pkg-config];
|
||||
|
||||
cargoLock.lockFile = ./Cargo.lock;
|
||||
# src = fetchFromGitHub {
|
||||
# owner = "BurntSushi";
|
||||
# repo = pname;
|
||||
# rev = version;
|
||||
# hash = "sha256-+s5RBC3XSgb8omTbUNLywZnP6jSxZBKSS1BmXOjRF8M=";
|
||||
# };
|
||||
|
||||
meta = {
|
||||
description = "an experimental browser written with servo and gtk, inspired by neon.";
|
||||
# homepage = "https://github.com/BurntSushi/ripgrep";
|
||||
# license = licenses.unlicense;
|
||||
# maintainers = [ maintainers.tailhook ];
|
||||
};
|
||||
}
|
||||
|
|
25
flake.lock
Normal file
25
flake.lock
Normal file
|
@ -0,0 +1,25 @@
|
|||
{
|
||||
"nodes": {
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1692128808,
|
||||
"narHash": "sha256-Di1Zm/P042NuwThMiZNrtmaAjd4Tm2qBOKHX7xUOfMk=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "4ed9856be002a730234a1a1ed9dcd9dd10cbdb40",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"id": "nixpkgs",
|
||||
"type": "indirect"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"nixpkgs": "nixpkgs"
|
||||
}
|
||||
}
|
||||
},
|
||||
"root": "root",
|
||||
"version": 7
|
||||
}
|
20
flake.nix
20
flake.nix
|
@ -1,19 +1,9 @@
|
|||
{
|
||||
description = "A libadwaita application in Rust";
|
||||
description = "xenon-browser";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||
flake-utils.url = "github:numtide/flake-utils";
|
||||
};
|
||||
|
||||
outputs = { self, nixpkgs, flake-utils }:
|
||||
flake-utils.lib.eachDefaultSystem (system:
|
||||
let
|
||||
pkgs = import nixpkgs { inherit system; };
|
||||
appDerivation = import ./default.nix { inherit pkgs; };
|
||||
in
|
||||
outputs = { self, nixpkgs }:
|
||||
let pkgs = nixpkgs.legacyPackages.x86_64-linux; in
|
||||
{
|
||||
defaultPackage = appDerivation;
|
||||
}
|
||||
);
|
||||
packages.x86_64-linux.default = pkgs.callPackage ./default.nix {};
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue