Merge pull request #211489 from figsoda/ion

ion: unstable-2021-05-10 -> unstable-2022-11-27
This commit is contained in:
figsoda 2023-01-19 18:44:21 -05:00 committed by GitHub
commit 147509fdfc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 46 additions and 19 deletions

View file

@ -0,0 +1,17 @@
--- a/build.rs
+++ b/build.rs
@@ -23,13 +23,7 @@ fn write_version_file() -> io::Result<()> {
let target = env::var("TARGET").unwrap();
let version_fname = Path::new(&env::var("OUT_DIR").unwrap()).join("version_string");
let mut version_file = File::create(&version_fname)?;
- write!(
- &mut version_file,
- "r#\"ion {} ({})\nrev {}\"#",
- version,
- target,
- get_git_rev()?.trim()
- )?;
+ write!(&mut version_file, "r#\"ion {version} ({target})\n\"#")?;
Ok(())
}

View file

@ -1,17 +1,40 @@
{ lib, stdenv, fetchFromGitHub, rustPlatform, Security, libiconv }:
{ lib
, rustPlatform
, fetchFromGitHub
, stdenv
, darwin
}:
rustPlatform.buildRustPackage rec {
pname = "ion";
version = "unstable-2021-05-10";
version = "unstable-2022-11-27";
src = fetchFromGitHub {
owner = "redox-os";
repo = "ion";
rev = "1170b84587bbad260a3ecac8e249a216cb1fd5e9";
sha256 = "sha256-lI1GwA3XerRJaC/Z8vTZc6GzRDLjv3w768C+Ui6Q+3Q=";
rev = "3bb8966fc99ba223033e1e02b0a6d50fc25cbef4";
sha256 = "sha256-6KW/YkMQFeGb1i+1YdADZRW89UruHsfPhMq9Cvxjl/4=";
};
cargoSha256 = "sha256-hURpgxc99iIMtzIlR6Kbfqcbu1uYLDHnfVLqgmMbvFA=";
cargoSha256 = "sha256-KLKPnj4SmAuspjMPAGLJ8Yy9SxAi6FvGE/FIF58lAH8=";
patches = [
# remove git revision from the build script to fix build
./build-script.patch
];
buildInputs = lib.optionals stdenv.isDarwin [
darwin.apple_sdk.frameworks.Security
];
checkFlags = lib.optionals stdenv.isDarwin [
# test assumes linux
"--skip=binary::completer::tests::filename_completion"
];
passthru = {
shellPath = "/bin/ion";
};
meta = with lib; {
description = "Modern system shell with simple (and powerful) syntax";
@ -19,15 +42,4 @@ rustPlatform.buildRustPackage rec {
license = licenses.mit;
maintainers = with maintainers; [ dywedir ];
};
buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [
Security
libiconv
];
doCheck = !stdenv.hostPlatform.isDarwin;
passthru = {
shellPath = "/bin/ion";
};
}

View file

@ -13709,9 +13709,7 @@ with pkgs;
fzf-git-sh = callPackage ../shells/fzf-git-sh {};
ion = callPackage ../shells/ion {
inherit (darwin) Security;
};
ion = callPackage ../shells/ion { };
jush = callPackage ../shells/jush { };