Add attic
This commit is contained in:
parent
9a8aa15d91
commit
932cfac79d
6 changed files with 156 additions and 2 deletions
3
.github/workflows/build.yml
vendored
3
.github/workflows/build.yml
vendored
|
@ -55,6 +55,9 @@ jobs:
|
|||
- python-instagram
|
||||
- moa
|
||||
- nix-s3-dedup
|
||||
- attic
|
||||
- attic-client
|
||||
- attic-server
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
|
|
11
default.nix
11
default.nix
|
@ -5,9 +5,15 @@
|
|||
# Having pkgs default to <nixpkgs> is fine though, and it lets you use short
|
||||
# commands such as:
|
||||
# nix-build -A mypackage
|
||||
{pkgs ? import <nixpkgs> {}}: {
|
||||
# The `lib`, `modules`, and `overlay` names are special
|
||||
{pkgs ? import <nixpkgs> {}}: let
|
||||
lib = import ./lib {inherit pkgs;}; # functions
|
||||
attic = lib.importFlake {
|
||||
input = "attic";
|
||||
inherit (pkgs) system;
|
||||
};
|
||||
in {
|
||||
# The `lib`, `modules`, and `overlay` names are special
|
||||
inherit lib;
|
||||
modules = import ./modules; # NixOS modules
|
||||
overlays = import ./overlays; # nixpkgs overlays
|
||||
|
||||
|
@ -58,4 +64,5 @@
|
|||
python-instagram = pkgs.python3Packages.callPackage ./python/instagram.nix {};
|
||||
moa = pkgs.python3Packages.callPackage ./moa {};
|
||||
nix-s3-dedup = pkgs.callPackage ./nix {};
|
||||
inherit (attic.defaultNix.packages.${pkgs.system}) attic attic-client attic-server;
|
||||
}
|
||||
|
|
116
flake.lock
116
flake.lock
|
@ -1,5 +1,92 @@
|
|||
{
|
||||
"nodes": {
|
||||
"attic": {
|
||||
"inputs": {
|
||||
"crane": "crane",
|
||||
"flake-compat": "flake-compat",
|
||||
"flake-utils": [
|
||||
"flake-utils"
|
||||
],
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1673819363,
|
||||
"narHash": "sha256-JQsPxaGHLCLtlxPzpf+b8XfA8vUwmIb9aJRsJQCht4Q=",
|
||||
"owner": "zhaofengli",
|
||||
"repo": "attic",
|
||||
"rev": "70ae61b59114982a2685f67b35405f7ca0bf5b6f",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "zhaofengli",
|
||||
"repo": "attic",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"crane": {
|
||||
"inputs": {
|
||||
"flake-compat": [
|
||||
"attic",
|
||||
"flake-compat"
|
||||
],
|
||||
"flake-utils": [
|
||||
"attic",
|
||||
"flake-utils"
|
||||
],
|
||||
"nixpkgs": [
|
||||
"attic",
|
||||
"nixpkgs"
|
||||
],
|
||||
"rust-overlay": "rust-overlay"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1672095661,
|
||||
"narHash": "sha256-7NTsdCn3qsvU7A+1/7tY8pxbq0DYy1pFYNpzN6he9lI=",
|
||||
"owner": "ipetkov",
|
||||
"repo": "crane",
|
||||
"rev": "98894bb39b03bfb379c5e10523cd61160e1ac782",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "ipetkov",
|
||||
"repo": "crane",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-compat": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1668681692,
|
||||
"narHash": "sha256-Ht91NGdewz8IQLtWZ9LCeNXMSXHUss+9COoqu6JLmXU=",
|
||||
"owner": "edolstra",
|
||||
"repo": "flake-compat",
|
||||
"rev": "009399224d5e398d03b22badca40a37ac85412a1",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "edolstra",
|
||||
"repo": "flake-compat",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-compat_2": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1668681692,
|
||||
"narHash": "sha256-Ht91NGdewz8IQLtWZ9LCeNXMSXHUss+9COoqu6JLmXU=",
|
||||
"owner": "edolstra",
|
||||
"repo": "flake-compat",
|
||||
"rev": "009399224d5e398d03b22badca40a37ac85412a1",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "edolstra",
|
||||
"repo": "flake-compat",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-utils": {
|
||||
"locked": {
|
||||
"lastModified": 1667395993,
|
||||
|
@ -32,9 +119,38 @@
|
|||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"attic": "attic",
|
||||
"flake-compat": "flake-compat_2",
|
||||
"flake-utils": "flake-utils",
|
||||
"nixpkgs": "nixpkgs"
|
||||
}
|
||||
},
|
||||
"rust-overlay": {
|
||||
"inputs": {
|
||||
"flake-utils": [
|
||||
"attic",
|
||||
"crane",
|
||||
"flake-utils"
|
||||
],
|
||||
"nixpkgs": [
|
||||
"attic",
|
||||
"crane",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1670034122,
|
||||
"narHash": "sha256-EqmuOKucPWtMvCZtHraHr3Q3bgVszq1x2PoZtQkUuEk=",
|
||||
"owner": "oxalica",
|
||||
"repo": "rust-overlay",
|
||||
"rev": "a0d5773275ecd4f141d792d3a0376277c0fc0b65",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "oxalica",
|
||||
"repo": "rust-overlay",
|
||||
"type": "github"
|
||||
}
|
||||
}
|
||||
},
|
||||
"root": "root",
|
||||
|
|
|
@ -4,6 +4,15 @@
|
|||
inputs = {
|
||||
nixpkgs.url = "github:NixOS/nixpkgs";
|
||||
flake-utils.url = "github:numtide/flake-utils";
|
||||
attic = {
|
||||
url = "github:zhaofengli/attic";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
inputs.flake-utils.follows = "flake-utils";
|
||||
};
|
||||
flake-compat = {
|
||||
url = "github:edolstra/flake-compat";
|
||||
flake = false;
|
||||
};
|
||||
};
|
||||
|
||||
outputs = {
|
||||
|
|
|
@ -3,4 +3,5 @@
|
|||
gradleDeps = pkgs.callPackage ./gradleDeps.nix {};
|
||||
opensslLegacyProvider = pkgs.callPackage ./opensslLegacyProvider.nix {};
|
||||
crushpng = pkgs.callPackage ./crushpng.nix {};
|
||||
importFlake = import ./importFlake.nix;
|
||||
}
|
||||
|
|
18
lib/importFlake.nix
Normal file
18
lib/importFlake.nix
Normal file
|
@ -0,0 +1,18 @@
|
|||
{
|
||||
input,
|
||||
system,
|
||||
}: let
|
||||
lock = builtins.fromJSON (builtins.readFile ../flake.lock);
|
||||
flake-compat = fetchTarball {
|
||||
url = "https://github.com/edolstra/flake-compat/archive/${lock.nodes.flake-compat.locked.rev}.tar.gz";
|
||||
sha256 = lock.nodes.flake-compat.locked.narHash;
|
||||
};
|
||||
input-src = fetchTarball {
|
||||
url = "https://github.com/${lock.nodes.${input}.locked.owner}/${lock.nodes.${input}.locked.repo}/archive/${lock.nodes.${input}.locked.rev}.tar.gz";
|
||||
sha256 = lock.nodes.${input}.locked.narHash;
|
||||
};
|
||||
in
|
||||
(import flake-compat) {
|
||||
src = input-src;
|
||||
inherit system;
|
||||
}
|
Reference in a new issue