Commit 4750a76428

4750a76428216f29c61a478a7471d9debe5af627

parent: 7ecf6c7a4a

Unsigned

jonboh <jon.bosque.hernando@gmail.com> · 2024-09-22 15:01 UTC

fix nix build CI

Layout: unified · split

.github/workflows/build_nix.yml +1 −3
@@ -1,8 +1,6 @@
11name: "Build legacy Nix package on Ubuntu"
2
32on:
43 push:
5
64jobs:
75 build:
86 runs-on: ubuntu-latest
@@ -10,4 +8,4 @@ jobs:
108 - uses: actions/checkout@v2
119 - uses: cachix/install-nix-action@v12
1210 - name: Building package
13 run: nix-build . -A defaultPackage.x86_64-linux
11 run: nix build ".#defaultPackage.x86_64-linux"
flake.lock +12 −46
@@ -5,29 +5,11 @@
55 "systems": "systems"
66 },
77 "locked": {
8 "lastModified": 1692799911,
9 "narHash": "sha256-3eihraek4qL744EvQXsK1Ha6C3CR7nnT8X2qWap4RNk=",
8 "lastModified": 1726560853,
9 "narHash": "sha256-X6rJYSESBVr3hBoH0WbKE5KvhPU5bloyZ2L4K60/fPQ=",
1010 "owner": "numtide",
1111 "repo": "flake-utils",
12 "rev": "f9e7cf818399d17d347f847525c5a5a8032e4e44",
13 "type": "github"
14 },
15 "original": {
16 "owner": "numtide",
17 "repo": "flake-utils",
18 "type": "github"
19 }
20 },
21 "flake-utils_2": {
22 "inputs": {
23 "systems": "systems_2"
24 },
25 "locked": {
26 "lastModified": 1681202837,
27 "narHash": "sha256-H+Rh19JDwRtpVPAWp64F+rlEtxUWBAQW28eAi3SRSzg=",
28 "owner": "numtide",
29 "repo": "flake-utils",
30 "rev": "cfacdce06f30d2b68473a46042957675eebb3401",
12 "rev": "c1dfcf08411b08f6b8615f7d8971a2bfa81d5e8a",
3113 "type": "github"
3214 },
3315 "original": {
@@ -38,11 +20,11 @@
3820 },
3921 "nixpkgs": {
4022 "locked": {
41 "lastModified": 1694183432,
42 "narHash": "sha256-YyPGNapgZNNj51ylQMw9lAgvxtM2ai1HZVUu3GS8Fng=",
23 "lastModified": 1726755586,
24 "narHash": "sha256-PmUr/2GQGvFTIJ6/Tvsins7Q43KTMvMFhvG6oaYK+Wk=",
4325 "owner": "nixos",
4426 "repo": "nixpkgs",
45 "rev": "db9208ab987cdeeedf78ad9b4cf3c55f5ebd269b",
27 "rev": "c04d5652cfa9742b1d519688f65d1bbccea9eb7e",
4628 "type": "github"
4729 },
4830 "original": {
@@ -54,11 +36,11 @@
5436 },
5537 "nixpkgs_2": {
5638 "locked": {
57 "lastModified": 1681358109,
58 "narHash": "sha256-eKyxW4OohHQx9Urxi7TQlFBTDWII+F+x2hklDOQPB50=",
39 "lastModified": 1718428119,
40 "narHash": "sha256-WdWDpNaq6u1IPtxtYHHWpl5BmabtpmLnMAx0RdJ/vo8=",
5941 "owner": "NixOS",
6042 "repo": "nixpkgs",
61 "rev": "96ba1c52e54e74c3197f4d43026b3f3d92e83ff9",
43 "rev": "e6cea36f83499eb4e9cd184c8a8e823296b50ad5",
6244 "type": "github"
6345 },
6446 "original": {
@@ -77,15 +59,14 @@
7759 },
7860 "rust-overlay": {
7961 "inputs": {
80 "flake-utils": "flake-utils_2",
8162 "nixpkgs": "nixpkgs_2"
8263 },
8364 "locked": {
84 "lastModified": 1694225334,
85 "narHash": "sha256-f3uOfcfmG53biFl6zHPHSFrBucLGQp0LpRYQJlozZSA=",
65 "lastModified": 1726972233,
66 "narHash": "sha256-FlL/bNESOtDQoczRhmPfReNAmLqVg+dAX4HectPOOf0=",
8667 "owner": "oxalica",
8768 "repo": "rust-overlay",
88 "rev": "1b4fad9dccece45c25b9ebda607427d69a8f1eae",
69 "rev": "36d73192555e569d27579f6c486fea3ab768823c",
8970 "type": "github"
9071 },
9172 "original": {
@@ -108,21 +89,6 @@
10889 "repo": "default",
10990 "type": "github"
11091 }
111 },
112 "systems_2": {
113 "locked": {
114 "lastModified": 1681028828,
115 "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
116 "owner": "nix-systems",
117 "repo": "default",
118 "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
119 "type": "github"
120 },
121 "original": {
122 "owner": "nix-systems",
123 "repo": "default",
124 "type": "github"
125 }
12692 }
12793 },
12894 "root": "root",
flake.nix +44 −43
@@ -5,47 +5,48 @@
55 rust-overlay.url = "github:oxalica/rust-overlay";
66 };
77
8 outputs = { self, nixpkgs, flake-utils, rust-overlay, ... }:
9 flake-utils.lib.eachDefaultSystem (system:
10 let
11 overlays = [ (import rust-overlay) ];
12 pkgs = import nixpkgs { inherit system overlays; };
13 rustVersion = pkgs.rust-bin.stable.latest.default;
14 toml = builtins.fromTOML (builtins.readFile ./Cargo.toml);
15
16 rustPlatform = pkgs.makeRustPlatform {
17 cargo = rustVersion;
18 rustc = rustVersion;
19 };
20
21 myRustBuild = rustPlatform.buildRustPackage {
22 pname =
23 toml.package.name; # make this what ever your cargo.toml package.name is
24 version = "v${toml.package.version}";
25 src = ./.; # the folder with the cargo.toml
26
27 cargoLock.lockFile = ./Cargo.lock;
28
29 buildInputs = with pkgs; [
30 openssl
31 xorg.libxcb
32 libsixel
33 mpv
34 ];
35
36 nativeBuildInputs = with pkgs; [
37 pkg-config
38 python3
39 ];
40 };
41
42 in
43 {
44 defaultPackage = myRustBuild;
45 devShell = pkgs.mkShell {
46 buildInputs =
47 [ (rustVersion.override { extensions = [ "rust-src" ]; }) ];
48 };
49 });
8 outputs = {
9 self,
10 nixpkgs,
11 flake-utils,
12 rust-overlay,
13 ...
14 }:
15 flake-utils.lib.eachDefaultSystem (system: let
16 overlays = [(import rust-overlay)];
17 pkgs = import nixpkgs {inherit system overlays;};
18 rustVersion = pkgs.rust-bin.stable.latest.default;
19 toml = builtins.fromTOML (builtins.readFile ./Cargo.toml);
20
21 rustPlatform = pkgs.makeRustPlatform {
22 cargo = rustVersion;
23 rustc = rustVersion;
24 };
25
26 youtube-tui = rustPlatform.buildRustPackage {
27 pname =
28 toml.package.name; # make this what ever your cargo.toml package.name is
29 version = "v${toml.package.version}";
30 src = ./.; # the folder with the cargo.toml
31
32 cargoLock.lockFile = ./Cargo.lock;
33
34 buildInputs = with pkgs; [
35 openssl
36 xorg.libxcb
37 libsixel
38 mpv
39 ];
40
41 nativeBuildInputs = with pkgs; [
42 pkg-config
43 python3
44 ];
45 };
46 in {
47 defaultPackage = youtube-tui;
48 devShell = pkgs.mkShell {
49 buildInputs = [(rustVersion.override {extensions = ["rust-src"];})];
50 };
51 });
5052}
51