Compare commits

...

10 commits

Author SHA1 Message Date
Cole Helbling 1d74f577a1 php: update svanderburg/composer2nix and php-amqplib/php-amqplib 2024-05-19 16:41:18 -07:00
Cole Helbling 0cd3543bc1 fixup: flake-compat 2024-05-19 16:41:18 -07:00
Cole Helbling 5d4d9c3904 Drop unused installation_id parameter
We auto-discover the correct installation ID absed on the repostory
context.
2024-05-19 16:41:18 -07:00
Cole Helbling 2aeca1fb72 Get GitHub token from file instead of static string 2024-05-19 16:41:18 -07:00
Cole Helbling aa70c3db6e Get rabbitmq password from file instead of static string 2024-05-19 16:41:18 -07:00
Cole Helbling 9254a448b7 Use rustls instead of openssl 2024-05-19 16:41:18 -07:00
Cole Helbling 8ba47c1e06 factoids.toml: remove
As far as I can tell, this hasn't been used anywhere in years.
2024-05-19 16:40:16 -07:00
Harsh Shandilya 3fd6b66cd3 README: remove stale advice about cargo2nix 2024-03-29 07:46:43 -07:00
Cole Helbling eb120ff74c build: send Ack if HEAD failed to fetch
Nothing we can do.
2024-02-01 20:14:09 -08:00
Cole Helbling f6159fbdd2 clone: also cleanup checkout with git gc 2024-02-01 20:14:09 -08:00
16 changed files with 126 additions and 198 deletions

122
Cargo.lock generated
View file

@ -599,21 +599,6 @@ version = "1.0.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1"
[[package]]
name = "foreign-types"
version = "0.3.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1"
dependencies = [
"foreign-types-shared",
]
[[package]]
name = "foreign-types-shared"
version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b"
[[package]]
name = "form_urlencoded"
version = "1.0.1"
@ -898,16 +883,16 @@ dependencies = [
]
[[package]]
name = "hyper-tls"
version = "0.5.0"
name = "hyper-rustls"
version = "0.23.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d6183ddfa99b85da61a140bea0efc93fdf56ceaa041b37d553518030827f9905"
checksum = "1788965e61b367cd03a62950836d5cd41560c3577d90e40e0819373194d1661c"
dependencies = [
"bytes",
"http",
"hyper 0.14.23",
"native-tls",
"rustls",
"tokio",
"tokio-native-tls",
"tokio-rustls",
]
[[package]]
@ -1204,24 +1189,6 @@ dependencies = [
"windows-sys 0.42.0",
]
[[package]]
name = "native-tls"
version = "0.2.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "07226173c32f2926027b63cce4bcd8076c3552846cbe7925f3aaffeac0a3b92e"
dependencies = [
"lazy_static",
"libc",
"log 0.4.17",
"openssl",
"openssl-probe",
"openssl-sys",
"schannel",
"security-framework",
"security-framework-sys",
"tempfile",
]
[[package]]
name = "nom"
version = "4.2.3"
@ -1336,51 +1303,12 @@ version = "1.16.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "86f0b0d4bf799edbc74508c1e8bf170ff5f41238e5f8225603ca7caaae2b7860"
[[package]]
name = "openssl"
version = "0.10.42"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "12fc0523e3bd51a692c8850d075d74dc062ccf251c0110668cbd921917118a13"
dependencies = [
"bitflags",
"cfg-if",
"foreign-types",
"libc",
"once_cell",
"openssl-macros",
"openssl-sys",
]
[[package]]
name = "openssl-macros"
version = "0.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b501e44f11665960c7e7fcf062c7d96a14ade4aa98116c004b2e37b5be7d736c"
dependencies = [
"proc-macro2",
"quote",
"syn",
]
[[package]]
name = "openssl-probe"
version = "0.1.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf"
[[package]]
name = "openssl-sys"
version = "0.9.77"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b03b84c3b2d099b81f0953422b4d4ad58761589d0229b5506356afca05a3670a"
dependencies = [
"autocfg",
"cc",
"libc",
"pkg-config",
"vcpkg",
]
[[package]]
name = "overload"
version = "0.1.1"
@ -1500,12 +1428,6 @@ dependencies = [
"tracing",
]
[[package]]
name = "pkg-config"
version = "0.3.26"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6ac9a59f73473f1b8d852421e59e64809f025994837ef743615c6d0c5b305160"
[[package]]
name = "polling"
version = "2.4.0"
@ -1617,25 +1539,27 @@ dependencies = [
"http",
"http-body",
"hyper 0.14.23",
"hyper-tls",
"hyper-rustls",
"ipnet",
"js-sys",
"log 0.4.17",
"mime 0.3.16",
"native-tls",
"once_cell",
"percent-encoding 2.1.0",
"pin-project-lite",
"rustls",
"rustls-pemfile",
"serde",
"serde_json",
"serde_urlencoded",
"tokio",
"tokio-native-tls",
"tokio-rustls",
"tower-service",
"url 2.3.0",
"wasm-bindgen",
"wasm-bindgen-futures",
"web-sys",
"webpki-roots",
"winreg",
]
@ -2020,13 +1944,14 @@ dependencies = [
]
[[package]]
name = "tokio-native-tls"
version = "0.3.0"
name = "tokio-rustls"
version = "0.23.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f7d995660bd2b7f8c1568414c1126076c13fbb725c40112dc0120b78eb9b717b"
checksum = "c43ee83903113e03984cb9e5cebe6c04a5116269e900e3ddba8f068a62adda59"
dependencies = [
"native-tls",
"rustls",
"tokio",
"webpki",
]
[[package]]
@ -2246,12 +2171,6 @@ dependencies = [
"version_check 0.9.4",
]
[[package]]
name = "vcpkg"
version = "0.2.15"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426"
[[package]]
name = "version_check"
version = "0.1.5"
@ -2378,6 +2297,15 @@ dependencies = [
"untrusted",
]
[[package]]
name = "webpki-roots"
version = "0.22.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b6c71e40d7d2c34a5106301fb632274ca37242cd0c9d3e64dbece371a40a2d87"
dependencies = [
"webpki",
]
[[package]]
name = "wepoll-ffi"
version = "0.1.2"

View file

@ -217,9 +217,7 @@ $ nix-build -A ofborg.rs # build ofborg
Currently there is no easy way to set up a test instance of ofborg. If `cargo
check` and `cargo test` both succeed, feel free to Pull Request your changes.
Make sure to format your code with `cargo fmt` and check for additional warnings
with `cargo clippy`. If you added, removed, or updated the dependencies, also be
sure to update Cargo.nix by running
[`./nix/update-crates.sh`](./nix/update-crates.sh).
with `cargo clippy`.
To disable warnings as errors, run your command with an empty `RUSTFLAGS`. For
example:

View file

@ -1,6 +1,6 @@
(import
(fetchTarball {
url = "https://github.com/edolstra/flake-compat/archive/99f1c2157fba4bfe6211a321fd0ee43199025dbf.tar.gz";
sha256 = "0x2jn3vrawwv9xp15674wjz9pixwjyj3j771izayl962zziivbx2";
url = "https://github.com/edolstra/flake-compat/archive/0f9255e01c2351cc7d116c072cb317785dd33b33.tar.gz";
sha256 = "0m9grvfsbwmvgwaxvdzv6cmyvjnlww004gfxjvcl806ndqaxzy4j";
})
{ src = ./.; }).defaultNix.packages.${builtins.currentSystem}

View file

@ -1,13 +0,0 @@
[factoids]
"!factoids" = "Have a helpful Nix factoid? Send a PR! https://github.com/grahamc/ofborg/blob/released/factoids.toml"
"!cloudfront" = "https://gist.github.com/grahamc/df1bb806eb3552650d03eef7036a72ba"
"!which channel" = "https://gist.github.com/grahamc/c60578c6e6928043d29a427361634df6#which-channel-is-right-for-me"
"!pills" = "https://nixos.org/nixos/nix-pills"
"!stuck" = "https://howoldis.herokuapp.com/"
"!doesanyoneuse" = "Don't ask if anyone uses software xyz, just ask your specific question. This helps solve your problem quicker, and allows people who haven't used xyz but may still be able to help you to do so."
"!library" = "Don't install libraries through nix-env or systemPackages. See https://nixos.wiki/wiki/FAQ/Libraries for details."
"!-A" = "You'll usually want to use nix-env -i with -A. It's faster and more precise. See https://nixos.wiki/wiki/FAQ/nix-env_-iA for details."
"!tofu" = "To get a sha256 hash of a new source, you can use the Trust On First Use model: use probably-wrong hash (for example: 0000000000000000000000000000000000000000000000000000) then replace it with the correct hash Nix expected."
"!unfree" = "You cannot install your unfree software? See https://nixos.wiki/wiki/FAQ/unfree"
"!notfound" = "nix-env -qaP does not show the package you are looking for but you are sure it should be there? Check out https://nixos.wiki/wiki/FAQ/notfound"
"!stateVersion" = "Do not update `system.stateVersion`. See https://nixos.wiki/wiki/FAQ/stateVersion for details."

View file

@ -53,7 +53,6 @@
git
];
buildInputs = with pkgs; [
openssl
] ++ lib.optionals stdenv.isDarwin [ darwin.Security libiconv ];
postHook = ''
@ -103,7 +102,6 @@
];
buildInputs = with pkgs; [
openssl
] ++ lib.optionals pkgs.stdenv.isDarwin (with pkgs; [
darwin.apple_sdk.frameworks.Security
darwin.apple_sdk.frameworks.CoreFoundation

View file

@ -14,7 +14,7 @@ fs2 = "0.4.3"
futures-util = "0.3.25"
#hubcaps = "0.6"
# for Conclusion::Skipped which is in master
hubcaps = { git = "https://github.com/softprops/hubcaps.git", rev = "d60d157b6638760fc725b2e4e4f329a4ec6b901e" }
hubcaps = { git = "https://github.com/softprops/hubcaps.git", rev = "d60d157b6638760fc725b2e4e4f329a4ec6b901e", default-features = false, features = ["app", "rustls-tls"] }
# hyper = { version = "0.14", features = ["full"] }
hyper = "=0.10.*"
# maybe can be removed when hyper is updated

View file

@ -147,6 +147,13 @@ pub trait GitClonable {
.stdout(Stdio::null())
.status()?;
debug!("git gc");
Command::new("git")
.arg("gc")
.current_dir(self.clone_to())
.stdout(Stdio::null())
.status()?;
lock.unlock();
Ok(())

View file

@ -35,7 +35,7 @@ pub struct RabbitMqConfig {
pub host: String,
pub virtualhost: Option<String>,
pub username: String,
pub password: String,
pub password_file: PathBuf,
}
#[derive(Serialize, Deserialize, Debug)]
@ -49,13 +49,12 @@ pub struct NixConfig {
#[derive(Serialize, Deserialize, Debug, Clone)]
pub struct GithubConfig {
pub token: String,
pub token_file: PathBuf,
}
#[derive(Serialize, Deserialize, Debug, Clone)]
pub struct GithubAppConfig {
pub app_id: u64,
pub installation_id: u64,
pub private_key: PathBuf,
}
@ -119,10 +118,12 @@ impl Config {
}
pub fn github(&self) -> Github {
let token = std::fs::read_to_string(self.github.clone().unwrap().token_file)
.expect("Couldn't read from GitHub token file");
Github::new(
"github.com/grahamc/ofborg",
// tls configured hyper client
Credentials::Token(self.github.clone().unwrap().token),
Credentials::Token(token),
)
.expect("Unable to create a github client instance")
}
@ -155,15 +156,17 @@ impl Config {
}
impl RabbitMqConfig {
pub fn as_uri(&self) -> String {
format!(
pub fn as_uri(&self) -> Result<String, std::io::Error> {
let password = std::fs::read_to_string(&self.password_file)?;
let uri = format!(
"{}://{}:{}@{}/{}",
if self.ssl { "amqps" } else { "amqp" },
self.username,
self.password,
password,
self.host,
self.virtualhost.clone().unwrap_or_else(|| "/".to_owned()),
)
);
Ok(uri)
}
}

View file

@ -31,7 +31,7 @@ pub fn from_config(cfg: &RabbitMqConfig) -> Result<Connection, lapin::Error> {
client_properties: props,
..Default::default()
};
task::block_on(Connection::connect(&cfg.as_uri(), opts))
task::block_on(Connection::connect(&cfg.as_uri()?, opts))
}
impl ChannelExt for Channel {

View file

@ -92,6 +92,10 @@ impl<'a, 'b> JobActions<'a, 'b> {
self.snippet_log.clone().into()
}
pub fn pr_head_missing(&mut self) {
self.tell(worker::Action::Ack);
}
pub fn commit_missing(&mut self) {
self.tell(worker::Action::Ack);
}
@ -311,7 +315,12 @@ impl notifyworker::SimpleNotifyWorker for BuildWorker {
};
let refpath = co.checkout_origin_ref(target_branch.as_ref()).unwrap();
co.fetch_pr(job.pr.number).unwrap();
if co.fetch_pr(job.pr.number).is_err() {
info!("Failed to fetch {}", job.pr.number);
actions.pr_head_missing();
return;
}
if !co.commit_exists(job.pr.head_sha.as_ref()) {
info!("Commit {} doesn't exist", job.pr.head_sha);

View file

@ -4,11 +4,16 @@
let
inherit (phpPackages) composer;
filterSrc = src:
builtins.filterSource (path: type: type != "directory" || (baseNameOf path != ".git" && baseNameOf path != ".git" && baseNameOf path != ".svn")) src;
buildZipPackage = { name, src }:
stdenv.mkDerivation {
inherit name src;
buildInputs = [ unzip ];
nativeBuildInputs = [ unzip ];
buildCommand = ''
shopt -s dotglob
unzip $src
baseDir=$(find . -type d -mindepth 1 -maxdepth 1)
cd $baseDir
@ -133,10 +138,9 @@ let
''}
'') (builtins.attrNames dependencies);
extraArgs = removeAttrs args [ "name" "packages" "devPackages" "buildInputs" ];
extraArgs = removeAttrs args [ "packages" "devPackages" "buildInputs" ];
in
stdenv.mkDerivation ({
name = "composer-${name}";
buildInputs = [ php composer ] ++ buildInputs;
inherit unpackPhase buildPhase;
@ -233,6 +237,7 @@ let
} // extraArgs);
in
{
inherit filterSrc;
composer = lib.makeOverridable composer;
buildZipPackage = lib.makeOverridable buildZipPackage;
buildPackage = lib.makeOverridable buildPackage;

View file

@ -1,7 +1,7 @@
{
"name": "nixos/ofborg-webhook",
"require": {
"php-amqplib/php-amqplib": ">=2.6.1",
"svanderburg/composer2nix": ">=0.0.3"
"php-amqplib/php-amqplib": ">=3.6.2",
"svanderburg/composer2nix": ">=0.0.6"
}
}

81
php/composer.lock generated
View file

@ -4,20 +4,20 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "6bf65db2920cc5f1530dd0c9d42fdaaa",
"content-hash": "cddc3bf153efe4b7d2314531fd7850a3",
"packages": [
{
"name": "paragonie/constant_time_encoding",
"version": "v2.4.0",
"version": "v2.7.0",
"source": {
"type": "git",
"url": "https://github.com/paragonie/constant_time_encoding.git",
"reference": "f34c2b11eb9d2c9318e13540a1dbc2a3afbd939c"
"reference": "52a0d99e69f56b9ec27ace92ba56897fe6993105"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/paragonie/constant_time_encoding/zipball/f34c2b11eb9d2c9318e13540a1dbc2a3afbd939c",
"reference": "f34c2b11eb9d2c9318e13540a1dbc2a3afbd939c",
"url": "https://api.github.com/repos/paragonie/constant_time_encoding/zipball/52a0d99e69f56b9ec27ace92ba56897fe6993105",
"reference": "52a0d99e69f56b9ec27ace92ba56897fe6993105",
"shasum": ""
},
"require": {
@ -71,7 +71,7 @@
"issues": "https://github.com/paragonie/constant_time_encoding/issues",
"source": "https://github.com/paragonie/constant_time_encoding"
},
"time": "2020-12-06T15:14:20+00:00"
"time": "2024-05-08T12:18:48+00:00"
},
{
"name": "paragonie/random_compat",
@ -125,22 +125,22 @@
},
{
"name": "php-amqplib/php-amqplib",
"version": "v3.0.0",
"version": "v3.6.2",
"source": {
"type": "git",
"url": "https://github.com/php-amqplib/php-amqplib.git",
"reference": "c0a8eade209b7e43d6a405303d8de716dfd02749"
"reference": "cb514530ce45a6d2f636be5196010c47c3bcf6e0"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/php-amqplib/php-amqplib/zipball/c0a8eade209b7e43d6a405303d8de716dfd02749",
"reference": "c0a8eade209b7e43d6a405303d8de716dfd02749",
"url": "https://api.github.com/repos/php-amqplib/php-amqplib/zipball/cb514530ce45a6d2f636be5196010c47c3bcf6e0",
"reference": "cb514530ce45a6d2f636be5196010c47c3bcf6e0",
"shasum": ""
},
"require": {
"ext-mbstring": "*",
"ext-sockets": "*",
"php": "^7.0|~8.0.0",
"php": "^7.2||^8.0",
"phpseclib/phpseclib": "^2.0|^3.0"
},
"conflict": {
@ -152,8 +152,8 @@
"require-dev": {
"ext-curl": "*",
"nategood/httpful": "^0.2.20",
"phpunit/phpunit": "^6.5|^7.0|^9.5",
"squizlabs/php_codesniffer": "^3.5"
"phpunit/phpunit": "^7.5|^9.5",
"squizlabs/php_codesniffer": "^3.6"
},
"type": "library",
"extra": {
@ -200,22 +200,22 @@
],
"support": {
"issues": "https://github.com/php-amqplib/php-amqplib/issues",
"source": "https://github.com/php-amqplib/php-amqplib/tree/v3.0.0"
"source": "https://github.com/php-amqplib/php-amqplib/tree/v3.6.2"
},
"time": "2021-03-16T15:00:23+00:00"
"time": "2024-04-15T18:31:22+00:00"
},
{
"name": "phpseclib/phpseclib",
"version": "3.0.8",
"version": "3.0.37",
"source": {
"type": "git",
"url": "https://github.com/phpseclib/phpseclib.git",
"reference": "d9615a6fb970d9933866ca8b4036ec3407b020b6"
"reference": "cfa2013d0f68c062055180dd4328cc8b9d1f30b8"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/d9615a6fb970d9933866ca8b4036ec3407b020b6",
"reference": "d9615a6fb970d9933866ca8b4036ec3407b020b6",
"url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/cfa2013d0f68c062055180dd4328cc8b9d1f30b8",
"reference": "cfa2013d0f68c062055180dd4328cc8b9d1f30b8",
"shasum": ""
},
"require": {
@ -224,11 +224,10 @@
"php": ">=5.6.1"
},
"require-dev": {
"phing/phing": "~2.7",
"phpunit/phpunit": "^5.7|^6.0|^9.4",
"squizlabs/php_codesniffer": "~2.0"
"phpunit/phpunit": "*"
},
"suggest": {
"ext-dom": "Install the DOM extension to load XML formatted public keys.",
"ext-gmp": "Install the GMP (GNU Multiple Precision) extension in order to speed up arbitrary precision integer arithmetic operations.",
"ext-libsodium": "SSH2/SFTP can make use of some algorithms provided by the libsodium-php extension.",
"ext-mcrypt": "Install the Mcrypt extension in order to speed up a few other cryptographic operations.",
@ -297,7 +296,7 @@
],
"support": {
"issues": "https://github.com/phpseclib/phpseclib/issues",
"source": "https://github.com/phpseclib/phpseclib/tree/3.0.8"
"source": "https://github.com/phpseclib/phpseclib/tree/3.0.37"
},
"funding": [
{
@ -313,27 +312,24 @@
"type": "tidelift"
}
],
"time": "2021-04-19T03:20:48+00:00"
"time": "2024-03-03T02:14:58+00:00"
},
{
"name": "svanderburg/composer2nix",
"version": "v0.0.5",
"version": "v0.0.6",
"source": {
"type": "git",
"url": "https://github.com/svanderburg/composer2nix.git",
"reference": "9983c6fafb277f6b305edf232c2690d6d28ec092"
"reference": "299caca4aac42d7639a42eb4dde951c010f6e91c"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/svanderburg/composer2nix/zipball/9983c6fafb277f6b305edf232c2690d6d28ec092",
"reference": "9983c6fafb277f6b305edf232c2690d6d28ec092",
"url": "https://api.github.com/repos/svanderburg/composer2nix/zipball/299caca4aac42d7639a42eb4dde951c010f6e91c",
"reference": "299caca4aac42d7639a42eb4dde951c010f6e91c",
"shasum": ""
},
"require": {
"svanderburg/pndp": "0.0.2"
},
"require-dev": {
"phpdocumentor/phpdocumentor": "2.9.x"
"svanderburg/pndp": "0.0.4"
},
"bin": [
"bin/composer2nix"
@ -358,27 +354,24 @@
"description": "Generate Nix expressions to build PHP composer packages",
"support": {
"issues": "https://github.com/svanderburg/composer2nix/issues",
"source": "https://github.com/svanderburg/composer2nix/tree/v0.0.5"
"source": "https://github.com/svanderburg/composer2nix/tree/v0.0.6"
},
"time": "2021-02-27T12:58:49+00:00"
"time": "2022-03-01T23:41:50+00:00"
},
{
"name": "svanderburg/pndp",
"version": "v0.0.2",
"version": "v0.0.4",
"source": {
"type": "git",
"url": "https://github.com/svanderburg/pndp.git",
"reference": "4bfe9c4120c23354ab8dc295957dc3009a39bff0"
"reference": "bc795b341d95c24bb577e0d7a4a37fde98b1cce8"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/svanderburg/pndp/zipball/4bfe9c4120c23354ab8dc295957dc3009a39bff0",
"reference": "4bfe9c4120c23354ab8dc295957dc3009a39bff0",
"url": "https://api.github.com/repos/svanderburg/pndp/zipball/bc795b341d95c24bb577e0d7a4a37fde98b1cce8",
"reference": "bc795b341d95c24bb577e0d7a4a37fde98b1cce8",
"shasum": ""
},
"require-dev": {
"phpdocumentor/phpdocumentor": "2.9.x"
},
"bin": [
"bin/pndp-build"
],
@ -402,9 +395,9 @@
"description": "PNDP: An internal DSL for Nix in PHP",
"support": {
"issues": "https://github.com/svanderburg/pndp/issues",
"source": "https://github.com/svanderburg/pndp/tree/v0.0.2"
"source": "https://github.com/svanderburg/pndp/tree/v0.0.4"
},
"time": "2017-10-22T12:43:22+00:00"
"time": "2022-02-26T22:15:06+00:00"
}
],
"packages-dev": [],
@ -415,5 +408,5 @@
"prefer-lowest": false,
"platform": [],
"platform-dev": [],
"plugin-api-version": "2.0.0"
"plugin-api-version": "2.6.0"
}

View file

@ -1,11 +1,11 @@
{pkgs ? import <nixpkgs> {
inherit system;
}, system ? builtins.currentSystem, noDev ? false}:
}, system ? builtins.currentSystem, noDev ? false, php ? pkgs.php, phpPackages ? pkgs.phpPackages}:
let
composerEnv = import ./composer-env.nix {
inherit (pkgs) stdenv lib writeTextFile fetchurl unzip phpPackages;
php = pkgs.php74;
inherit (pkgs) stdenv lib writeTextFile fetchurl unzip;
inherit php phpPackages;
};
in
import ./php-packages.nix {

View file

@ -5,10 +5,10 @@ let
"paragonie/constant_time_encoding" = {
targetDir = "";
src = composerEnv.buildZipPackage {
name = "paragonie-constant_time_encoding-f34c2b11eb9d2c9318e13540a1dbc2a3afbd939c";
name = "paragonie-constant_time_encoding-52a0d99e69f56b9ec27ace92ba56897fe6993105";
src = fetchurl {
url = "https://api.github.com/repos/paragonie/constant_time_encoding/zipball/f34c2b11eb9d2c9318e13540a1dbc2a3afbd939c";
sha256 = "1r1xj3j7s5mskw5gh3ars4dfhvcn7d252gdqgpif80026kj5fvrp";
url = "https://api.github.com/repos/paragonie/constant_time_encoding/zipball/52a0d99e69f56b9ec27ace92ba56897fe6993105";
sha256 = "1ja5b3fm5v665igrd37vs28zdipbh1xgh57lil2iaggvh1b8kh4x";
};
};
};
@ -25,40 +25,40 @@ let
"php-amqplib/php-amqplib" = {
targetDir = "";
src = composerEnv.buildZipPackage {
name = "php-amqplib-php-amqplib-c0a8eade209b7e43d6a405303d8de716dfd02749";
name = "php-amqplib-php-amqplib-cb514530ce45a6d2f636be5196010c47c3bcf6e0";
src = fetchurl {
url = "https://api.github.com/repos/php-amqplib/php-amqplib/zipball/c0a8eade209b7e43d6a405303d8de716dfd02749";
sha256 = "1lck5hpraxi4w3831lfzz6l7c82118b56aghdz0dr4r92366j3xf";
url = "https://api.github.com/repos/php-amqplib/php-amqplib/zipball/cb514530ce45a6d2f636be5196010c47c3bcf6e0";
sha256 = "0mjca0m9960m8xgi22azwk8v1lgg8yznxscw10sqfzgp4wj4sfv0";
};
};
};
"phpseclib/phpseclib" = {
targetDir = "";
src = composerEnv.buildZipPackage {
name = "phpseclib-phpseclib-d9615a6fb970d9933866ca8b4036ec3407b020b6";
name = "phpseclib-phpseclib-cfa2013d0f68c062055180dd4328cc8b9d1f30b8";
src = fetchurl {
url = "https://api.github.com/repos/phpseclib/phpseclib/zipball/d9615a6fb970d9933866ca8b4036ec3407b020b6";
sha256 = "1xyymb11qdx8rn6c9bx9js8yq405bmjq8ar8phvpji9a3fdd6z4v";
url = "https://api.github.com/repos/phpseclib/phpseclib/zipball/cfa2013d0f68c062055180dd4328cc8b9d1f30b8";
sha256 = "1wgzy4fbj565czpn9xasr8lnd9ilh1x3bsalrpx5bskvqr4zspgj";
};
};
};
"svanderburg/composer2nix" = {
targetDir = "";
src = composerEnv.buildZipPackage {
name = "svanderburg-composer2nix-9983c6fafb277f6b305edf232c2690d6d28ec092";
name = "svanderburg-composer2nix-299caca4aac42d7639a42eb4dde951c010f6e91c";
src = fetchurl {
url = "https://api.github.com/repos/svanderburg/composer2nix/zipball/9983c6fafb277f6b305edf232c2690d6d28ec092";
sha256 = "1s1gv2b4y9pjv56mif8fgch56sssdmrcwb1gk3gksxc0jq2w2zbv";
url = "https://api.github.com/repos/svanderburg/composer2nix/zipball/299caca4aac42d7639a42eb4dde951c010f6e91c";
sha256 = "0vb7q4za6z89azz4c5v7hgcv9gblcpk7hffl6va7q5f27fyyhwy0";
};
};
};
"svanderburg/pndp" = {
targetDir = "";
src = composerEnv.buildZipPackage {
name = "svanderburg-pndp-4bfe9c4120c23354ab8dc295957dc3009a39bff0";
name = "svanderburg-pndp-bc795b341d95c24bb577e0d7a4a37fde98b1cce8";
src = fetchurl {
url = "https://api.github.com/repos/svanderburg/pndp/zipball/4bfe9c4120c23354ab8dc295957dc3009a39bff0";
sha256 = "0n2vwpwshv16bhb7a6j95m664zh4lpfa7dqmcyhmn89nxpgvg91y";
url = "https://api.github.com/repos/svanderburg/pndp/zipball/bc795b341d95c24bb577e0d7a4a37fde98b1cce8";
sha256 = "1y46wsccjwdkvs1c1bklwbp7crsg0axyr7ncdibbny1sr54xb24i";
};
};
};
@ -68,7 +68,7 @@ in
composerEnv.buildPackage {
inherit packages devPackages noDev;
name = "nixos-ofborg-webhook";
src = ./.;
src = composerEnv.filterSrc ./.;
executable = false;
symlinkDependencies = false;
meta = {};

View file

@ -1,6 +1,6 @@
(import
(fetchTarball {
url = "https://github.com/edolstra/flake-compat/archive/99f1c2157fba4bfe6211a321fd0ee43199025dbf.tar.gz";
sha256 = "0x2jn3vrawwv9xp15674wjz9pixwjyj3j771izayl962zziivbx2";
url = "https://github.com/edolstra/flake-compat/archive/0f9255e01c2351cc7d116c072cb317785dd33b33.tar.gz";
sha256 = "0m9grvfsbwmvgwaxvdzv6cmyvjnlww004gfxjvcl806ndqaxzy4j";
})
{ src = ./.; }).shellNix