|
1 | 1 | {
|
2 |
| - inputs = { |
3 |
| - nixpkgs = { |
4 |
| - url = "github:NixOS/nixpkgs/nixpkgs-unstable"; |
5 |
| - }; |
| 2 | + inputs = { |
| 3 | + utils.url = "github:numtide/flake-utils"; |
| 4 | + }; |
| 5 | + outputs = |
| 6 | + { |
| 7 | + self, |
| 8 | + nixpkgs, |
| 9 | + utils, |
| 10 | + ... |
| 11 | + }: |
| 12 | + utils.lib.eachDefaultSystem ( |
| 13 | + system: |
| 14 | + let |
| 15 | + pkgs = import nixpkgs { inherit system; }; |
| 16 | + ww = |
| 17 | + { |
| 18 | + lib, |
| 19 | + openssl, |
| 20 | + pkg-config, |
| 21 | + rustPlatform, |
| 22 | + }: |
| 23 | + rustPlatform.buildRustPackage { |
| 24 | + name = "ww"; |
| 25 | + src = lib.cleanSource ./.; |
| 26 | + cargoLock.lockFile = ./Cargo.lock; |
| 27 | + nativeBuildInputs = [ |
| 28 | + pkg-config |
| 29 | + rustPlatform.bindgenHook |
| 30 | + ]; |
| 31 | + buildInputs = [ openssl ]; |
| 32 | + checkFlags = [ |
| 33 | + # connecting to internet does not work in the sandbox |
| 34 | + "--skip=modules::location::tests::geolocation_response" |
| 35 | + "--skip=modules::localization::tests::translate_string" |
| 36 | + ]; |
6 | 37 |
|
7 |
| - flake-utils = { |
8 |
| - url = "github:numtide/flake-utils"; |
9 |
| - }; |
10 |
| - }; |
11 |
| - outputs = inputs @ { |
12 |
| - self, |
13 |
| - nixpkgs, |
14 |
| - flake-utils, |
15 |
| - ... |
16 |
| - }: |
17 |
| - flake-utils.lib.eachDefaultSystem (system: let |
18 |
| - pkgs = nixpkgs.legacyPackages.${system}; |
19 |
| - ww = { |
20 |
| - lib, |
21 |
| - openssl, |
22 |
| - pkg-config, |
23 |
| - rustPlatform, |
24 |
| - }: |
25 |
| - rustPlatform.buildRustPackage { |
26 |
| - name = "ww"; |
27 |
| - src = lib.cleanSource ./.; |
28 |
| - cargoLock.lockFile = ./Cargo.lock; |
29 |
| - nativeBuildInputs = [ |
30 |
| - pkg-config |
31 |
| - rustPlatform.bindgenHook |
32 |
| - ]; |
33 |
| - buildInputs = [openssl]; |
34 |
| - |
35 |
| - checkFlags = [ |
36 |
| - # connecting to internet does not work in the sandbox |
37 |
| - "--skip=modules::location::tests::geolocation_response" |
38 |
| - "--skip=modules::localization::tests::translate_string" |
39 |
| - ]; |
40 |
| - |
41 |
| - meta = with lib; { |
42 |
| - license = licenses.mit; |
43 |
| - homepage = "https://github.com/andygeorge/ww"; |
44 |
| - platforms = platforms.all; |
45 |
| - }; |
46 |
| - }; |
47 |
| - in { |
48 |
| - packages.default = pkgs.callPackage ww {}; |
49 |
| - apps.default = { |
50 |
| - type = "app"; |
51 |
| - program = "${self.outputs.packages.${system}.default}/bin/ww"; |
52 |
| - }; |
53 |
| - }); |
| 38 | + meta = with lib; { |
| 39 | + license = licenses.mit; |
| 40 | + homepage = "https://github.com/andygeorge/ww"; |
| 41 | + platforms = platforms.all; |
| 42 | + }; |
| 43 | + }; |
| 44 | + in |
| 45 | + { |
| 46 | + packages.default = pkgs.callPackage ww { }; |
| 47 | + apps.default = { |
| 48 | + type = "app"; |
| 49 | + program = "${self.outputs.packages.${system}.default}/bin/ww"; |
| 50 | + }; |
| 51 | + } |
| 52 | + ); |
54 | 53 | }
|
0 commit comments