I spent some time trying to get compilation on non-x86_64 systems possibly working, but we're currently limited by AppImage, which doesn't want to work properly.main
parent
1dc22701cd
commit
17fb9bbd77
@ -0,0 +1,163 @@ |
||||
{ |
||||
"nodes": { |
||||
"cargo2nix": { |
||||
"inputs": { |
||||
"flake-compat": "flake-compat", |
||||
"flake-utils": "flake-utils", |
||||
"nixpkgs": [ |
||||
"garage", |
||||
"nixpkgs" |
||||
], |
||||
"rust-overlay": "rust-overlay" |
||||
}, |
||||
"locked": { |
||||
"lastModified": 1666087781, |
||||
"narHash": "sha256-trKVdjMZ8mNkGfLcY5LsJJGtdV3xJDZnMVrkFjErlcs=", |
||||
"owner": "Alexis211", |
||||
"repo": "cargo2nix", |
||||
"rev": "a7a61179b66054904ef6a195d8da736eaaa06c36", |
||||
"type": "github" |
||||
}, |
||||
"original": { |
||||
"owner": "Alexis211", |
||||
"repo": "cargo2nix", |
||||
"rev": "a7a61179b66054904ef6a195d8da736eaaa06c36", |
||||
"type": "github" |
||||
} |
||||
}, |
||||
"flake-compat": { |
||||
"flake": false, |
||||
"locked": { |
||||
"lastModified": 1650374568, |
||||
"narHash": "sha256-Z+s0J8/r907g149rllvwhb4pKi8Wam5ij0st8PwAh+E=", |
||||
"owner": "edolstra", |
||||
"repo": "flake-compat", |
||||
"rev": "b4a34015c698c7793d592d66adbab377907a2be8", |
||||
"type": "github" |
||||
}, |
||||
"original": { |
||||
"owner": "edolstra", |
||||
"repo": "flake-compat", |
||||
"type": "github" |
||||
} |
||||
}, |
||||
"flake-utils": { |
||||
"locked": { |
||||
"lastModified": 1659877975, |
||||
"narHash": "sha256-zllb8aq3YO3h8B/U0/J1WBgAL8EX5yWf5pMj3G0NAmc=", |
||||
"owner": "numtide", |
||||
"repo": "flake-utils", |
||||
"rev": "c0e246b9b83f637f4681389ecabcb2681b4f3af0", |
||||
"type": "github" |
||||
}, |
||||
"original": { |
||||
"owner": "numtide", |
||||
"repo": "flake-utils", |
||||
"type": "github" |
||||
} |
||||
}, |
||||
"garage": { |
||||
"inputs": { |
||||
"cargo2nix": "cargo2nix", |
||||
"nixpkgs": "nixpkgs" |
||||
}, |
||||
"locked": { |
||||
"lastModified": 1672666365, |
||||
"narHash": "sha256-lpNp/jw4YaczG3NM3pVWR0cZ8u/KBQCWvvfAswO4+Do=", |
||||
"ref": "main", |
||||
"rev": "76230f20282e73a5a5afa33af68152acaf732cf5", |
||||
"revCount": 1007, |
||||
"type": "git", |
||||
"url": "https://git.deuxfleurs.fr/Deuxfleurs/garage.git" |
||||
}, |
||||
"original": { |
||||
"ref": "main", |
||||
"rev": "76230f20282e73a5a5afa33af68152acaf732cf5", |
||||
"type": "git", |
||||
"url": "https://git.deuxfleurs.fr/Deuxfleurs/garage.git" |
||||
} |
||||
}, |
||||
"nixpkgs": { |
||||
"locked": { |
||||
"lastModified": 1665657542, |
||||
"narHash": "sha256-mojxNyzbvmp8NtVtxqiHGhRfjCALLfk9i/Uup68Y5q8=", |
||||
"owner": "NixOS", |
||||
"repo": "nixpkgs", |
||||
"rev": "a3073c49bc0163fea6a121c276f526837672b555", |
||||
"type": "github" |
||||
}, |
||||
"original": { |
||||
"owner": "NixOS", |
||||
"repo": "nixpkgs", |
||||
"rev": "a3073c49bc0163fea6a121c276f526837672b555", |
||||
"type": "github" |
||||
} |
||||
}, |
||||
"pkgsSrc": { |
||||
"locked": { |
||||
"lastModified": 1672580127, |
||||
"narHash": "sha256-3lW3xZslREhJogoOkjeZtlBtvFMyxHku7I/9IVehhT8=", |
||||
"owner": "NixOS", |
||||
"repo": "nixpkgs", |
||||
"rev": "0874168639713f547c05947c76124f78441ea46c", |
||||
"type": "github" |
||||
}, |
||||
"original": { |
||||
"id": "nixpkgs", |
||||
"ref": "nixos-22.05", |
||||
"type": "indirect" |
||||
} |
||||
}, |
||||
"root": { |
||||
"inputs": { |
||||
"garage": "garage", |
||||
"pkgsSrc": "pkgsSrc", |
||||
"utils": "utils" |
||||
} |
||||
}, |
||||
"rust-overlay": { |
||||
"inputs": { |
||||
"flake-utils": [ |
||||
"garage", |
||||
"cargo2nix", |
||||
"flake-utils" |
||||
], |
||||
"nixpkgs": [ |
||||
"garage", |
||||
"cargo2nix", |
||||
"nixpkgs" |
||||
] |
||||
}, |
||||
"locked": { |
||||
"lastModified": 1664247556, |
||||
"narHash": "sha256-J4vazHU3609ekn7dr+3wfqPo5WGlZVAgV7jfux352L0=", |
||||
"owner": "oxalica", |
||||
"repo": "rust-overlay", |
||||
"rev": "524db9c9ea7bc7743bb74cdd45b6d46ea3fcc2ab", |
||||
"type": "github" |
||||
}, |
||||
"original": { |
||||
"owner": "oxalica", |
||||
"repo": "rust-overlay", |
||||
"type": "github" |
||||
} |
||||
}, |
||||
"utils": { |
||||
"locked": { |
||||
"lastModified": 1667395993, |
||||
"narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=", |
||||
"owner": "numtide", |
||||
"repo": "flake-utils", |
||||
"rev": "5aed5285a952e0b949eb3ba02c12fa4fcfef535f", |
||||
"type": "github" |
||||
}, |
||||
"original": { |
||||
"owner": "numtide", |
||||
"repo": "flake-utils", |
||||
"type": "github" |
||||
} |
||||
} |
||||
}, |
||||
"root": "root", |
||||
"version": 7 |
||||
} |
@ -0,0 +1,53 @@ |
||||
{ |
||||
|
||||
inputs.pkgsSrc.url = "nixpkgs/nixos-22.05"; |
||||
|
||||
inputs.utils.url = "github:numtide/flake-utils"; |
||||
|
||||
# v0.8.1 |
||||
inputs.garage.url = "git+https://git.deuxfleurs.fr/Deuxfleurs/garage.git?ref=main&rev=76230f20282e73a5a5afa33af68152acaf732cf5"; |
||||
|
||||
description = "cryptic-net provides the foundation for an autonomous community |
||||
cloud infrastructure"; |
||||
|
||||
outputs = { |
||||
|
||||
self, pkgsSrc, utils, garage, |
||||
|
||||
}: let |
||||
|
||||
supportedSystems = [ |
||||
"x86_64-linux" |
||||
#"aarch64-linux" |
||||
#"armv7l-linux" # rpi, I think? |
||||
#"i686-linux" |
||||
]; |
||||
|
||||
in utils.lib.eachSystem supportedSystems (system: let |
||||
|
||||
pkgs = import pkgsSrc { |
||||
inherit system; |
||||
|
||||
#crossSystem = { |
||||
# config = system; |
||||
#}; |
||||
|
||||
overlays = [ |
||||
(import ./nix/overlays/go_1_18.nix) |
||||
]; |
||||
}; |
||||
|
||||
defaultAttrs = (import ./default.nix) { |
||||
inherit pkgs; |
||||
hostSystem = system; |
||||
#buildSystem = self.system; |
||||
garage = garage.packages."${system}".default; |
||||
selfRev = if self ? rev then self.rev else "UNKNOWN"; |
||||
}; |
||||
|
||||
in { |
||||
|
||||
defaultPackage = defaultAttrs.appImage; |
||||
|
||||
}); |
||||
} |
@ -1,33 +0,0 @@ |
||||
{ |
||||
|
||||
fetchgit, |
||||
buildEnv, |
||||
minio-client, |
||||
|
||||
}: let |
||||
|
||||
version = "0.8.0-unstable"; |
||||
|
||||
src = fetchgit { |
||||
name = "garage-v${version}"; |
||||
url = "https://git.deuxfleurs.fr/Deuxfleurs/garage.git"; |
||||
rev = "293139a94a8911aaac1b650e4707379a972196aa"; |
||||
sha256 = "sha256-b6HHLnxMdmpngiywll6Egr8O9/4cqBN01Mj3OwVMeBc="; |
||||
}; |
||||
|
||||
in rec { |
||||
|
||||
garage = (import "${src}/default.nix") { git_version = version; }; |
||||
|
||||
minioClient = minio-client; |
||||
|
||||
env = buildEnv { |
||||
name = "cryptic-net-garage"; |
||||
paths = [ |
||||
garage.pkgs.amd64.release |
||||
minioClient |
||||
]; |
||||
}; |
||||
|
||||
} |
||||
|
@ -0,0 +1,21 @@ |
||||
# Make buildGoModules use static compilation by default, and use go 1.18 |
||||
# everywhere. |
||||
(final: prev: |
||||
|
||||
let |
||||
|
||||
buildArgs = { |
||||
doCheck = false; |
||||
CGO_ENABLED=0; |
||||
tags = [ "netgo" "timetzdata" ]; |
||||
ldflags = [ "-w" "-extldflags=-static" ]; |
||||
}; |
||||
|
||||
in { |
||||
|
||||
go = prev.go_1_18; |
||||
buildGoModule = args: prev.buildGo118Module (buildArgs // args); |
||||
buildGo118Module = args: prev.buildGo118Module (buildArgs // args); |
||||
|
||||
} |
||||
) |
@ -1,38 +0,0 @@ |
||||
rec { |
||||
|
||||
overlays = [ |
||||
|
||||
# Make buildGoModules use static compilation by default, and use go 1.18 |
||||
# everywhere. |
||||
(final: prev: |
||||
|
||||
let |
||||
|
||||
buildArgs = { |
||||
doCheck = false; |
||||
CGO_ENABLED=0; |
||||
tags = [ "netgo" "timetzdata" ]; |
||||
ldflags = [ "-w" "-extldflags=-static" ]; |
||||
}; |
||||
|
||||
in { |
||||
|
||||
go = prev.go_1_18; |
||||
buildGoModule = args: prev.buildGo118Module (buildArgs // args); |
||||
buildGo118Module = args: prev.buildGo118Module (buildArgs // args); |
||||
|
||||
} |
||||
) |
||||
]; |
||||
|
||||
version = "22-05"; |
||||
rev = "2aec372cdcd4d73b94863611fea70e0884270fdc"; |
||||
|
||||
src = fetchTarball { |
||||
name = "nixpkgs-${version}"; |
||||
url = "https://github.com/NixOS/nixpkgs/archive/${rev}.tar.gz"; |
||||
sha256 = "1pbfhlh4v8l70p44gspsci3i6w0wk70vaisiawg3jhka2nxb8367"; |
||||
}; |
||||
|
||||
pkgs = import src { inherit overlays; }; |
||||
} |
@ -0,0 +1 @@ |
||||
Release: 0.0.1 |
Loading…
Reference in new issue